<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Making XAML Icons with MatrixTransform work</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Making XAML Icons with MatrixTransform work]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 16 May 2026 01:04:55 +0000</pubDate>
  <lastBuildDate>Tue, 07 Mar 2023 08:44:58 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24367</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Making XAML Icons with MatrixTransform work : As a reminder to myself, and hopefully...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24367&amp;PID=78651&amp;title=making-xaml-icons-with-matrixtransform-work#78651</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2876">DavidH</a><br /><strong>Subject:</strong> 24367<br /><strong>Posted:</strong> 07 March 2023 at 8:44am<br /><br /><div>As a reminder to myself, and hopefully helpful to others and the Codejock devs:</div><div><br></div><div>To make MatrixTransform work as a RenderTransform in CJ 22.0.0, I had to make the following changes:</div><div><br></div><div>-<font face="Courier New, Courier, mono"> Source\Markup\XTPMarkupContext.cpp</font> -&gt; Add registrations to parser</div><div>Add:<br></div><div><font face="Courier New, Courier, mono">#include "Markup/Transform/XTPMarkupMatrixTransform.h"</font></div><div><font face="Courier New, Courier, mono">#include "Markup/Transform/XTPMarkupGdiPlusMatrixTransform.h"<br></font></div><div><font face="Courier New, Courier, mono"><font face="Verdana, Arial, Helvetica, sans-serif">in</font> void CXTPMarkupContext::RegisterClasses()<font face="Verdana, Arial, Helvetica, sans-serif">, add:<br></font></font></div><div><font face="Courier New, Courier, mono">CXTPMarkupGdiPlusMatrixTransform::RegisterType();</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div>- <font face="Courier New, Courier, mono">Source\Markup\Transform\XTPMarkupGdiPlusMatrixTransform.cpp</font>&nbsp; Simply use the transformation:</div><font face="Courier New, Courier, mono">BOOL CXTPMarkupGdiPlusMatrixTransform::TransformMatrix(const CXTPGdiPlus* pReserved,<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GpMatrix* pMatrix)<br>{<br>&nbsp;&nbsp; &nbsp;UNREFERENCED_PARAMETER(pReserved);<br><br>&nbsp;&nbsp; &nbsp;ASSERT(NULL != pMatrix);<br><br>&nbsp;&nbsp; &nbsp;const int matrixValues&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;= 6;<br>&nbsp;&nbsp; &nbsp;CXTPMarkupDoubleCollection* pValues = GetMatrix();<br>&nbsp;&nbsp; &nbsp;if (pValues-&gt;GetCount() &lt; matrixValues || matrixValues &gt; pValues-&gt;GetCount())<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return FALSE;<br><br></font><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; Matrix m((Gdiplus::REAL)pValues-&gt;GetAt(0), (Gdiplus::REAL)pValues-&gt;GetAt(1),</font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Gdiplus::REAL)pValues-&gt;GetAt(2), (Gdiplus::REAL)pValues-&gt;GetAt(3),</font></div><div><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Gdiplus::REAL)pValues-&gt;GetAt(4), (Gdiplus::REAL)pValues-&gt;GetAt(5));</font></div><font face="Courier New, Courier, mono"><br>&nbsp;&nbsp; &nbsp;if (Gdiplus::Ok != GdipMultiplyMatrix(pMatrix, &amp;m, Gdiplus::MatrixOrderPrepend))<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return FALSE;<br><br>&nbsp;&nbsp; &nbsp;return TRUE;<br>}<br></font><div><br></div><div>- <font face="Courier New, Courier, mono">Source\Markup\XTPMarkupObject.cpp</font> Support floats with powers (e/E):</div><div><font face="Courier New, Courier, mono">BOOL CXTPMarkupDoubleCollection::GetNextValue(LPCWSTR&amp; lpszValue, float&amp; fValue)<br>{<br>&nbsp;&nbsp; &nbsp;while (*lpszValue != '\0' &amp;&amp; isspace(*lpszValue)) lpszValue++;<br>&nbsp;&nbsp; &nbsp;if (*lpszValue == '\0') {<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; return FALSE;<br>&nbsp;&nbsp; &nbsp;}<br><br>&nbsp;&nbsp; &nbsp;WCHAR* lpszEnd;<br>&nbsp;&nbsp; &nbsp;fValue = wcstof(lpszValue, &amp;lpszEnd);<br>&nbsp;&nbsp; &nbsp;auto result = lpszValue != lpszEnd;<br>&nbsp;&nbsp; &nbsp;lpszValue = lpszEnd;<br>&nbsp;&nbsp; &nbsp;return result;<br>}</font><br></div><div><br></div>With these changes, all the Axialis XAML icons I'm using in my project work.]]>
   </description>
   <pubDate>Tue, 07 Mar 2023 08:44:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24367&amp;PID=78651&amp;title=making-xaml-icons-with-matrixtransform-work#78651</guid>
  </item> 
 </channel>
</rss>