/** * @file XTPMarkupMatrixTransform.cpp * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ #include "StdAfx.h" #include "Common/XTPTypeId.h" #include "Common/XTPCasting.h" #include "Common/XTPFramework.h" #include "Common/XTPSystemHelpers.h" #include "Markup/XTPMarkupTools.h" #include "Markup/XTPMarkupObject.h" #include "Markup/Transform/XTPMarkupTransform.h" #include "Markup/Transform/XTPMarkupMatrixTransform.h" #include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" #ifdef _DEBUG # undef THIS_FILE static char THIS_FILE[] = __FILE__; # define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////////// // CXTPMarkupMatrixTransform CXTPMarkupDependencyProperty* CXTPMarkupMatrixTransform::m_pPropertyMatrix = NULL; IMPLEMENT_MARKUPCLASS(NULL, CXTPMarkupMatrixTransform, CXTPMarkupTransform); void CXTPMarkupMatrixTransform::RegisterMarkupClass() { m_pPropertyMatrix = CXTPMarkupDependencyProperty::Register( L"Matrix", MARKUP_TYPE(CXTPMarkupDoubleCollection), MARKUP_TYPE(CXTPMarkupMatrixTransform), new CXTPMarkupPropertyMetadata(NULL, CXTPMarkupPropertyMetadata::flagAffectsMeasure)); } CXTPMarkupDoubleCollection* CXTPMarkupMatrixTransform::GetMatrix() const { return MARKUP_STATICCAST(CXTPMarkupDoubleCollection, GetValue(m_pPropertyMatrix)); } void CXTPMarkupMatrixTransform::SetMatrix(CXTPMarkupDoubleCollection* pMatrix) { SetValue(m_pPropertyMatrix, pMatrix); } CXTPMarkupTransformationMatrix* CXTPMarkupMatrixTransform::ApplyTransform(const CXTPMarkupTransformationMatrix* pMatrix) { _ASSERTE(NULL != pMatrix); UNREFERENCED_PARAMETER(pMatrix); return NULL; } #include "Common/Base/Diagnostic/XTPBeginAfxMap.h" BEGIN_DISPATCH_MAP(CXTPMarkupMatrixTransform, CXTPMarkupTransform) DISP_PROPERTY_EX(CXTPMarkupMatrixTransform, "Matrix", OleGetMatrix, OleSetMatrix, VT_DISPATCH) END_DISPATCH_MAP() #include "Common/Base/Diagnostic/XTPEndAfxMap.h" LPDISPATCH CXTPMarkupMatrixTransform::OleGetMatrix() { return XTPGetDispatch(GetMatrix()); } void CXTPMarkupMatrixTransform::OleSetMatrix(LPDISPATCH pDisp) { CXTPMarkupObject* pObject = FromDispatchAs(MARKUP_TYPE(CXTPMarkupDoubleCollection), pDisp); SetMatrix(NULL != pObject ? static_cast(pObject) : NULL); }