As a reminder to myself, and hopefully helpful to others and the Codejock devs:
To make MatrixTransform work as a RenderTransform in CJ 22.0.0, I had to make the following changes:
- Source\Markup\XTPMarkupContext.cpp -> Add registrations to parser Add:
#include "Markup/Transform/XTPMarkupMatrixTransform.h" #include "Markup/Transform/XTPMarkupGdiPlusMatrixTransform.h"
in void CXTPMarkupContext::RegisterClasses(), add:
CXTPMarkupGdiPlusMatrixTransform::RegisterType();
- Source\Markup\Transform\XTPMarkupGdiPlusMatrixTransform.cpp Simply use the transformation: BOOL CXTPMarkupGdiPlusMatrixTransform::TransformMatrix(const CXTPGdiPlus* pReserved, GpMatrix* pMatrix) { UNREFERENCED_PARAMETER(pReserved);
ASSERT(NULL != pMatrix);
const int matrixValues = 6; CXTPMarkupDoubleCollection* pValues = GetMatrix(); if (pValues->GetCount() < matrixValues || matrixValues > pValues->GetCount()) return FALSE;
Matrix m((Gdiplus::REAL)pValues->GetAt(0), (Gdiplus::REAL)pValues->GetAt(1), (Gdiplus::REAL)pValues->GetAt(2), (Gdiplus::REAL)pValues->GetAt(3), (Gdiplus::REAL)pValues->GetAt(4), (Gdiplus::REAL)pValues->GetAt(5)); if (Gdiplus::Ok != GdipMultiplyMatrix(pMatrix, &m, Gdiplus::MatrixOrderPrepend)) return FALSE;
return TRUE; }
- Source\Markup\XTPMarkupObject.cpp Support floats with powers (e/E): BOOL CXTPMarkupDoubleCollection::GetNextValue(LPCWSTR& lpszValue, float& fValue) { while (*lpszValue != '\0' && isspace(*lpszValue)) lpszValue++; if (*lpszValue == '\0') { return FALSE; }
WCHAR* lpszEnd; fValue = wcstof(lpszValue, &lpszEnd); auto result = lpszValue != lpszEnd; lpszValue = lpszEnd; return result; }
With these changes, all the Axialis XAML icons I'm using in my project work.
|