<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13479614</id><updated>2012-12-12T23:15:01.073+01:00</updated><title type='text'>Trained Monkey Hacking Experience</title><subtitle type='html'>On LibreOffice, programming, reverse-engineering and file formats</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fridrich.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default?start-index=26&amp;max-results=25'/><author><name>Fridrich Strba</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13479614.post-3885474562104689570</id><published>2012-12-07T17:19:00.001+01:00</published><updated>2012-12-12T22:50:27.023+01:00</updated><title type='text'>LibreOffice Visio Import Filter: 20 years of drawings opened in your favourite office suite</title><content type='html'>It is true that the support of the most used Microsoft Visio file formats in &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; will celebrate 1 year next February. And I will gladly have a birthday talk with any of you who will be freezing in Brussels during the next &lt;a href="http://fosdem.org/" target="_blank"&gt;FOSDEM 2013&lt;/a&gt;. Nonetheless, even though libvisio was in development for several months already, the Visio story was far from finished when we released that day. As I already mentioned in &lt;a href="http://fridrich.blogspot.ch/2012/11/libreoffice-coreldraw-import-filter.html" target="_blank"&gt;another blogpost&lt;/a&gt; concerning reverse-engineering of file formats, assessment of a conversion quality in this kind of cases is illusory before real users get to stress-test it with real-life documents.&lt;br /&gt;
Since the first release of our filter in &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; 3.5.0, we were improving it thanks to bug reports from our users. It is a big &lt;b&gt;thank you&lt;/b&gt; that I would like to say to all those that took the bother to submit reports in our bugzilla. Without you, guys, this filter would be only a moot exercise.&lt;br /&gt;
But wait... Do I write this blog now only to thank the people who contributed to the current quality of the filter? Yes to a big extent! Nevertheless, I know that the distinguished readers of this blog would like to have some news. And, yes, we have some news.&lt;br /&gt;
The &lt;a href="http://www.freedesktop.org/wiki/Software/libvisio" target="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt; library underwent heavy re-factoring as we started to understand more and more details about the underlying file-format.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;A particular bug report about files imported as empty pages provided us with a document structure that we did never see before. This resulted in a more generic parser and unification on the way we parse master shapes and visible pages.&lt;/li&gt;
&lt;li&gt;This re-factoring in its turn allowed us to extend our file-format coverage to all earlier binary Visio file-format versions. We now support all binary Visio documents starting from Visio 1 (released in 1992).&lt;/li&gt;
&lt;li&gt;Extending the support to earlier file-format versions allowed us to better understand the development of the file-format, to find more information that we did not parse before, and improve the conversion quality for other binary versions too.&lt;/li&gt;
&lt;li&gt;Another re-factoring came with our work to support the &lt;code&gt;XML&lt;/code&gt;-based Visio file-formats, namely the "XML Drawing" also known as &lt;code&gt;*.vdx&lt;/code&gt;; and the Microsoft Visio 2013 new file-format, known as &lt;code&gt;*.vsdx&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;So the news is that &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; 4.0.0 will be able to open &lt;b&gt;ALL&lt;/b&gt; Visio files starting from Visio 1 (release in 1992) until Microsoft Visio 2013 (released just some weeks ago).&lt;br /&gt;
And since the readers of this blog are more interested in pictures than in pointless words, here come some candies for your eyes:&lt;br /&gt;
&lt;table align="center"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;File opened in Visio 1.0&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;The same file opened in LibreOffice 4.0.0 beta1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/Visio_Flowchart_vsd.png" target="_blank"&gt;&lt;img alt="File in Visio 1.0" src="http://people.freedesktop.org/~fridrich/blogs/thumb_Visio_Flowchart_vsd.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/Draw_FlowChart_vsd.png" target="_blank"&gt;&lt;img alt="File in LibreOffice 4.0.0 beta1" src="http://people.freedesktop.org/~fridrich/blogs/thumb_Draw_FlowChart_vsd.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table align="center"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;VSDX File opened in Microsoft Visio 2013&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;The same file opened in LibreOffice 4.0.0 beta1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/Visio_Rack_vsdx.png" target="_blank"&gt;&lt;img alt="VSDX File in Microsoft Visio 2013" src="http://people.freedesktop.org/~fridrich/blogs/thumb_Visio_Rack_vsdx.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/Draw_Rack_vsdx.png" target="_blank"&gt;&lt;img alt="File in LibreOffice 4.0.0 beta1" src="http://people.freedesktop.org/~fridrich/blogs/thumb_Draw_Rack_vsdx.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;So, download the &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; 4.0.0 beta1 and help us testing the new big release. We are interested in bug reports that help us to improve our quality. And for those that would love to support us with donations, just click here:&lt;br /&gt;
&lt;div align="center"&gt;&lt;a href="http://donate.libreoffice.org/" target="_blank"&gt;&lt;img alt="Donate for LibreOffice" src="http://www.libreoffice.org/assets/Donations/LibOWebsiteBannersDonateEN400b.png" /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3885474562104689570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3885474562104689570'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/12/libreoffice-visio-import-filter-20.html' title='LibreOffice Visio Import Filter: 20 years of drawings opened in your favourite office suite'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-3515661525518895997</id><published>2012-11-26T15:57:00.001+01:00</published><updated>2012-11-26T16:34:40.121+01:00</updated><title type='text'>LibreOffice CorelDraw import filter: improvements by user input</title><content type='html'>&lt;p&gt;It has been a long time without communicating with the distinguished readership of my blog. There was a hard decision to be made between producing code and producing literature. The code won until now. But now I have found a time to lift my head up from the coding, so the literature is back.&lt;/p&gt;&lt;p&gt;Many of you might be wondering what happened since my &lt;a href="http://fridrich.blogspot.ch/2012/06/libreoffice-coreldraw-import-filter.html" target="_blank"&gt;post about the text support in CorelDraw files from last June&lt;/a&gt;. Things are going pretty well. Since the CorelDraw import filter was released with &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice 3.6&lt;/a&gt;, the users started to use the feature and report bugs. We were working on fixing them and improving the &lt;a href="http://www.freedesktop.org/wiki/Software/libcdr" target="_blank"&gt;&lt;code&gt;libcdr&lt;/code&gt;'s&lt;/a&gt; quality.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Quick overview of reverse-engineering process&lt;/b&gt;&lt;/p&gt;&lt;p&gt;From my discussions with our users and developers on-line and during some of the conferences that I attended, I realize that there is a slight misunderstanding in the large public about how the reverse-engineering works. So, here are some thoughts that may help understand it a bit more:&lt;/p&gt;&lt;p&gt;At the beginning of the process, there is a file-format. We don't know anything about its internal structure. There is no documentation whatsoever about it. One tries to generate a file in this file-format and examine it in hexadecimal viewer. Next, one tries to operate some little change in the document and examine what changed in the file itself. Eventually after many iterations, one might find regularities and some structure that helps to divide the file into several sections or blocks of more manageable size. It is essential in this phase that one can encode this information into some kind of introspection tool, since a plain hexadecimal viewer is not a very productive tool in the long run. We use for introspection of documents &lt;a href="http://bugware.livejournal.com/" target="_blank"&gt;Valek Filippov&lt;/a&gt;'s &lt;a href="http://libregraphicsworld.org/blog/entry/whats-new-with-re-lab-and-ole-toy" target="_blank"&gt;&lt;code&gt;oletoy&lt;/code&gt;&lt;/a&gt;, a python tool that stores our knowledge about the structure of different file-formats.&lt;/p&gt;&lt;p&gt;Once there is enough information about how to parse the document structure, the next target becomes to get some visible results. In order to save time and get visible results in a short time, all libraries such as &lt;code&gt;libcdr&lt;/code&gt; or &lt;code&gt;libvisio&lt;/code&gt;, use the &lt;a href="http://libwpg.git.sourceforge.net/git/gitweb.cgi?p=libwpg/libwpg;a=blob_plain;f=src/lib/WPGPaintInterface.h;hb=refs/heads/STABLE-0-2-0" target="_blank"&gt;&lt;code&gt;libwpg&lt;/code&gt;'s interface&lt;/a&gt;. Reusing this interface means a considerable saving of time, since there are already working generators of ODG and SVG from the callbacks of this interface. Having visible results soon in the development/reverse-engineering cycle also allows visually asses the import results and correct them if necessary. Eventually, one can realize the absence of necessary information and try to go back to reverse-engineering to find it.&lt;/p&gt;&lt;b&gt;Users' feedback is essential&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The support of reverse-engineered file-formats is a constant work-in-progress. A subtle dance between implementation and information digging. In this process, the user feedback is an essential element. The theories about the meaning of some information inside file hold only until a file comes to falsify them. Even a complex file generated by a developer is easily beaten by real life documents. And each file that shows a &amp;quot;weird&amp;quot; bug is advancing the understanding of the file-format. Let us look at this example:&lt;/p&gt;&lt;p&gt;After the release of &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice 3.6.1&lt;/a&gt;, we got a not so good assessment of the quality of the CorelDraw import filter in the &lt;a href="http://www.heise.de/ct/inhalt/2012/20/76/"&gt;heise.de' c't&lt;/a&gt; review. Those of you that understand German can delight in the nuanced evaluation:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Ein neuer Import-Filter in Draw &amp;ouml;ffnet jetzt auch CorelDraw-Dateien, was uns im Test allerdings nur mit sehr einfachen Zeichnungen fehlerfrei gelang. In dieser Form ist er schlicht unbrauchbar.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Which can be mildly translated into English (given the understatements so common in en-GB):&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;A new import filter in Draw opens now also CorelDraw files, which we managed to do without errors only with very simple drawings. In this form, it is rather unusable.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Since we are really concerned about the quality of our software, we are thankful for any bug report whether it is brought to us in a friendly or other manner. This specific bug report helped us to understand how are stored in newer CorelDraw files chains of matrix transforms. And since a picture speaks louder then thousand words, compare the document c't was refering to opened in LibreOffice 3.6.2 and then in LibreOffice 3.6.3, after we fixed the position bits.&lt;/p&gt;&lt;table align="center"&gt;&lt;tr&gt;&lt;td&gt;File opened in Libreoffice 3.6.2&lt;/td&gt;&lt;td&gt;&amp;nbsp&lt;/td&gt;&lt;td&gt;The same file opened in LibreOffice 3.6.3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="center" &gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/heise-avant.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_heise-avant.png" alt="File in LibreOffice 3.6.2" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td align="center" &gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/heise-apres.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_heise-apres.png" alt="File in LibreOffice 3.6.2"/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;p&gt;So feel encouraged to submit bugs against the CorelDraw import filter, or &amp;mdash; even better &amp;mdash; send us patches for your favorite itch.&lt;/p&gt;&lt;br /&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3515661525518895997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3515661525518895997'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/11/libreoffice-coreldraw-import-filter.html' title='LibreOffice CorelDraw import filter: improvements by user input'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-6345614747291879479</id><published>2012-07-02T10:52:00.001+02:00</published><updated>2012-07-02T10:52:39.867+02:00</updated><title type='text'>Susan's Book on Intellectual Property and Access to Education</title><content type='html'>&lt;p&gt;I  am happy to announce &lt;a href="http://www.brill.nl/international-copyright-law-and-access-education-developing-countries" target="_blank"&gt;the upcoming book of my dear wife&lt;/a&gt;. A must read for all interested in intellectual property, in access to  copyrighted materials and in development issues.&lt;/p&gt;&lt;p&gt;This book originates from a PhD thesis defended at the &lt;a href="http://graduateinstitute.ch/" target="_blank"&gt;Graduate Institute of International and Development Studies, Geneva, Switzerland&lt;/a&gt;. It has been awarded "summa cum laude" mention.&lt;/p&gt;&lt;p&gt;Check, please, with your libraries whether they know about the book and advise them strongly to purchase it for the biggest good of the humanity :)&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6345614747291879479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6345614747291879479'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/07/susans-book-on-intellectual-property.html' title='Susan&apos;s Book on Intellectual Property and Access to Education'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-5655031658157214697</id><published>2012-06-12T10:01:00.000+02:00</published><updated>2012-06-12T10:01:00.451+02:00</updated><title type='text'>LibreOffice CorelDraw Import filter - text support hatches out</title><content type='html'>&lt;p&gt;Uff, it is done!!!&lt;/p&gt;&lt;p&gt;We started to work on the text support inside &lt;a href="http://www.freedesktop.org/wiki/Software/libcdr" target="_blank"&gt;&lt;code&gt;libcdr&lt;/code&gt;&lt;/a&gt; already before the &lt;a href="http://libre-graphics-meeting.org/2012/" target="_blank"&gt;Libre Graphics Meeting in Vienna&lt;/a&gt;. We worked hard during the talks and the long evenings after having eaten some portions of &lt;i&gt;Wienerschnitzl&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;Now we are proud to announce that we managed to release yesterday &lt;a href="http://cgit.freedesktop.org/libreoffice/libcdr/" target="_blank"&gt;&lt;code&gt;libcdr-0.0.8&lt;/code&gt;&lt;/a&gt; with "basic initial primitive [u]ncomplete" (further BIPU) &lt;b&gt;text support&lt;/b&gt;. At the moment, we are supporting only a couple of parameters as a font face and font size and we are able to detect the encoding and produce a corresponding utf-8 string. Far from being perfect, it is nonetheless a milestone, because in the FOSS world, there was no support for CorelDraw text before.&lt;/p&gt;&lt;p&gt;We know that you prefer to look at nice pictures instead of reading bad text. So, this gives your heart's desires.&lt;/p&gt;&lt;p&gt;A simple document with text in CorelDraw 7:&lt;p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/fancytext_cdr7.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_fancytext_cdr7.png" alt="fancytext_cdr7.cdr in CorelDraw 7"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The same document opened in a build of &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; from yesterday:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/fancytext_draw.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_fancytext_draw.png" alt="fancytext_cdr7.cdr in CorelDraw 7"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;At the moment, &lt;a href="http://www.freedesktop.org/wiki/Software/libcdr" target="_blank"&gt;&lt;code&gt;libcdr&lt;/code&gt;&lt;/a&gt; is able to convert text in CorelDraw documents from versions 7 to 16. Nonetheless, we know already roughly how to read it in files of lower versions and we will add the support for next release. In the same way, we will extend our support of other text properties, like font colour, transparency, effects, paragraph alignments, character positions, etc.&lt;/p&gt;&lt;p&gt;How can I test it? All this goodness will be part of &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; 3.6.0 release. You will be able to test the text support in the 3.6.0 beta2 pre-release. For the brave, any of the &lt;a href="http://dev-builds.libreoffice.org/daily" target="_blank"&gt;daily builds&lt;/a&gt; that are built from a code checkout after June 11th also include &lt;a href="http://cgit.freedesktop.org/libreoffice/libcdr/" target="_blank"&gt;&lt;code&gt;libcdr-0.0.8&lt;/code&gt;&lt;/a&gt; and thus the text support in CorelDraw files.&lt;/p&gt;&lt;p&gt;As usual, this is a free and open source software project and, as such, it delights in developers that want to help. So, if you feel the itch, patches can be sent to &lt;a href="mailto:libreoffice@lists.freedesktop.org"&gt;&lt;code&gt;libreoffice-dev&lt;/code&gt;&lt;/a&gt; mailing list. And, do not forget to find a way to join the &lt;a href="irc://chat.freenode.net/libreoffice-dev" target="_blank"&gt;&lt;code&gt;#libreoffice-dev&lt;/code&gt;&lt;/a&gt; channel at &lt;a href="http://webchat.freenode.net/" target="_blank"&gt;&lt;code&gt;irc.freenode.net&lt;/code&gt;&lt;/a&gt; in order to meet other developers. We can promis you that you will feel at home in the &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; community.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/5655031658157214697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/5655031658157214697'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/06/libreoffice-coreldraw-import-filter.html' title='LibreOffice CorelDraw Import filter - text support hatches out'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-6469730665721906054</id><published>2012-06-06T15:23:00.000+02:00</published><updated>2012-06-12T20:06:55.153+02:00</updated><title type='text'>LibreOffice MS Publisher Import filter - young but strong baby</title><content type='html'>&lt;p&gt;As &lt;a href="http://sophiegautier.com/blog/index.php/2012/06/05/157-une-nouvelle-branche-de-printemps-la-36" target="_blank"&gt;Sophie Gauthier&lt;/a&gt; announced in the language of Voltaire, &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; was branched for the beta phase in view of the 3.6 release. This is a major step in order to bring the features we were working on during the last half a year to the end users. But, it is also oportunity to bring to the main codebase all the nifty nice features that were developed in feature branches and targeted for the next big release, presumably the 3.7.&lt;/p&gt;&lt;p&gt;It is this way that the first version of our new Microsoft Publisher import filter landed to the master. This filter is developed by Brennan Vincent from the University of Arizona in the frame of the &lt;a href="http://www.google-melange.com/gsoc/org/google/gsoc2012/libreoffice" target="_blank"&gt;Google Summer of Code&lt;/a&gt;. Although being a work in progress and supporting for the while only the Publisher 2003 file-format, the progress is spectacular. Brennan has been busy like a bee even long before the start of the program. After only two weeks from the official kick-off, we have a first (non-)release, &lt;a href="http://dev-www.libreoffice.org/src/libmspub-0.0.0.tar.gz" target="_blank"&gt;libmspub-0.0.0&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;And as the careful readers of this blog already know, an image speaks louder then thousand words, here are the pics:&lt;/p&gt;&lt;p&gt;A random document from the Internet opened in Microsoft Publisher 2003:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/mspub_russian_pub2k3.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_mspub_russian_pub2k3.png" alt="Document in Publisher 2003"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The same document opened in LibreOffice master build from yesterday:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/mspub_russian_draw.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_mspub_russian_draw.png" alt="The same document in LibreOffice Draw"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;With &lt;a href="http://bugware.livejournal.com/" target="_blank"&gt;Valek Filippov&lt;/a&gt;, we have a lot of fun mentoring this project. If anybody of the distinguished readership wants to join this effort, the code of &lt;code&gt;libmspub&lt;/code&gt; lives in &lt;a href="http://cgit.freedesktop.org/libreoffice/libmspub" target="_blank"&gt;LibreOffice freedesktop.org repository&lt;/a&gt;. The patches can be sent to &lt;a href="mailto:libreoffice@lists.freedesktop.org"&gt;&lt;code&gt;libreoffice-dev&lt;/code&gt;&lt;/a&gt; mailing list. And, do not forget to find a way to join the &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;&lt;code&gt;#libreoffice-dev&lt;/code&gt;&lt;/a&gt; channel at &lt;a href="http://webchat.freenode.net/"&gt;&lt;code&gt;irc.freenode.net&lt;/code&gt;&lt;/a&gt; in order to meet other developers.&lt;/p&gt;&lt;p&gt;You will never regret the decision to get involved in &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt;.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6469730665721906054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6469730665721906054'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/06/libreoffice-ms-publisher-import-filter.html' title='LibreOffice MS Publisher Import filter - young but strong baby'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-2211486722922763242</id><published>2012-04-23T21:57:00.001+02:00</published><updated>2012-04-23T22:05:31.258+02:00</updated><title type='text'>Google Summer of Code 2012 - accepted projects for LibreOffice</title><content type='html'>&lt;p&gt;Google announced today the accepted students for Google Summer of Code 2011.&lt;/p&gt;&lt;p&gt;The students working on LibreOffice will be:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;td align="left"&gt;Student&lt;/td&gt;&lt;td align="left"&gt;Title&lt;/td&gt;&lt;td align="left"&gt;Mentor&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Andrzej Hunt&lt;/td&gt;&lt;td align="left"&gt;Smartphone remote control for LibreOffice Impress&lt;/td&gt;&lt;td align="left"&gt;Muthu Subramanian&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;ArturoPL&lt;/td&gt;&lt;td align="left"&gt;Tooling - More and better tests &lt;/td&gt;&lt;td align="left"&gt;Michael Stahl&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Brennan Vincent&lt;/td&gt;&lt;td align="left"&gt;Implementing a Microsoft Publisher import filter for LibreOffice&lt;/td&gt;&lt;td align="left"&gt;Valek Filippov&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Daniel Bankston&lt;/td&gt;&lt;td align="left"&gt;Calc Performance Improvements&lt;/td&gt;&lt;td align="left"&gt;Kohei Yoshida&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Daniel Korostil&lt;/td&gt;&lt;td align="left"&gt;Lightproof improvements&lt;/td&gt;&lt;td align="left"&gt;László Németh&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Gökcen Eraslan&lt;/td&gt;&lt;td align="left"&gt;Signed PDF export&lt;/td&gt;&lt;td align="left"&gt;Stephan Bergmann&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;iainb&lt;/td&gt;&lt;td align="left"&gt;Java GUI for Libre-Office Based Android App(s)&lt;/td&gt;&lt;td align="left"&gt;Tor Lillqvist&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Marco Cecchetti&lt;/td&gt;&lt;td align="left"&gt;Enhanced Impress svg export filter&lt;/td&gt;&lt;td align="left"&gt;Thorsten Behrens&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Matúš Kukan&lt;/td&gt;&lt;td align="left"&gt;Telepathy for collaboration&lt;/td&gt;&lt;td align="left"&gt;Eike Rathke (erAck)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="left"&gt;Rafael&lt;/td&gt;&lt;td align="left"&gt;New templates picking UI&lt;/td&gt;&lt;td align="left"&gt;Cédric Bosdonnat&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Let the summer start immediately and let quality code fall like a spring rain!&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/2211486722922763242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/2211486722922763242'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/04/google-summer-of-code-2012-accepted.html' title='Google Summer of Code 2012 - accepted projects for LibreOffice'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-1462092396552061722</id><published>2012-04-02T17:37:00.001+02:00</published><updated>2012-04-03T13:55:22.208+02:00</updated><title type='text'>LibreOffice CorelDraw Import filter - the best file-format coverage in the FOSS world</title><content type='html'>&lt;p&gt;I just realized that has been a long long time since I last &lt;a href="http://fridrich.blogspot.com/2012/01/libreoffice-coreldraw-import-filter.html" target="_blank"&gt;blogged&lt;/a&gt; about &lt;a href="http://cgit.freedesktop.org/libreoffice/libcdr/" target="_blank"&gt;&lt;code&gt;libcdr&lt;/code&gt;&lt;/a&gt; and the CorelDraw import filter in &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt;. Those that know me well can imagine that it is much more fun to write code then to write blogs. Nonetheless, one serious breakthrough happened this weekend and I cannot prevent myself from climbing on the roofs and shout.&lt;/p&gt;&lt;p&gt;On 20&lt;sup&gt;th&lt;/sup&gt; of March 2012, &lt;a href="http://www.corel.com/corel/" target="_blank"&gt;Corel&lt;/a&gt; released a new version of CorelDraw Graphics Suite X6. We got the information from this &lt;a href="http://en.wikipedia.org/wiki/CDR_%28file_format%29#CDR_file_format" target="_blank"&gt;Wikipedia&lt;/a&gt; page and downloaded the evaluation version on Friday. Although it was usual to see the file-format mutate a bit with every released version, this release changed the file-format substantially in what concerns the &lt;a href="http://en.wikipedia.org/wiki/Resource_Interchange_File_Format" target="_blank"&gt;RIFF chunks&lt;/a&gt;. To cut the long story short, we managed to get the last pieces reverse-engineered today and we released libcdr-0.0.6 with support of all 32-bit CorelDraw formats, from version 6 to 16.&lt;/p&gt;&lt;p&gt;The new release tarball was integrated in &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; which became the first and only FOSS application that supports versions 6, 15 and 16 of the CorelDraw file-format. This goodness will be part of our 3.6 release later this year. For those that do not know fear, the feature can be tested in daily builds that will start to appear tomorrow morning &lt;a href="http://dev-builds.libreoffice.org/daily/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I know that the distinguished readership prefers pictures to words. Here is this simple document in CorelDraw X6 format:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/terra_v16_1.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_terra_v16_1.png" alt="Terra in Corel 1"/&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/terra_v16_2.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_terra_v16_2.png" alt="Terra in Corel 2"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Here is the same document opened by LibreOffice Draw:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/terra_v16_lodraw.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_terra_v16_lodraw.png" alt="Terra in LibreOffice Draw"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And here is the &lt;code&gt;libcdr&lt;/code&gt;-generated SVG opened in Inkscape:&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://people.freedesktop.org/~fridrich/blogs/terra_v16_inkscape.png" target="_blank"&gt;&lt;img src="http://people.freedesktop.org/~fridrich/blogs/thumb_terra_v16_inkscape.png" alt="Terra in converted to SVG"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you are tempted and think that it might be fun to participate in a reverse-engineering endavour, we have with Valek two project proposals for Google Summer of Code 2012. The first is the implementation of &lt;a href="http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Implement_Microsoft_Publisher_Import_filter_for_LibreOffice" target="_blank"&gt;MS Publisher import filter for LibreOffice&lt;/a&gt; and the second is to help to &lt;a href="http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Improve_and_extend_the_CorelDraw_Import_filter_for_LibreOffice" target="_blank"&gt;improve and extend the Corel Draw import filter&lt;/a&gt; I am currently blogging about. Try to apply with &lt;a href="http://www.google-melange.com/gsoc/org/google/gsoc2012/libreoffice" target="_blank"&gt;LibreOffice&lt;/a&gt; and your life will never be the same again.&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://www.google-melange.com/gsoc/org/google/gsoc2012/libreoffice" target="_blank"&gt;&lt;img src="http://code.google.com/images/GSoC2012_300x200.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Be aware though that the application deadline is the 6&lt;sup&gt;th&lt;/sup&gt; of April and you will need to accomplish a simple programing task in order to be eligible. More details in this &lt;a href="http://blog.documentfoundation.org/2012/03/26/libreoffice-google-summer-of-code/" target="_blank"&gt;blog&lt;/a&gt;.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/1462092396552061722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/1462092396552061722'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/04/libreoffice-coreldraw-import-filter.html' title='LibreOffice CorelDraw Import filter - the best file-format coverage in the FOSS world'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-4435178119409634262</id><published>2012-03-19T14:30:00.002+01:00</published><updated>2012-03-19T14:32:29.589+01:00</updated><title type='text'>Google Summer of Code at LibreOffice: become famous and maybe rich!</title><content type='html'>&lt;p align="center"&gt;&lt;a href="http://www.google-melange.com/gsoc/org/google/gsoc2012/libreoffice" target="_blank"&gt;&lt;img src="http://code.google.com/images/GSoC2012_300x200.png"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So, just before the weekend, we received the great news that Google chose &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; as a mentoring organisation for &lt;a href="http://code.google.com/soc/" target="_blank"&gt;Google Summer of Code&lt;/a&gt; again this year. Some of you might remember that last year we had several extremely successful Google Summer of Code projects and that two of our successful students are currently employed working on free and opensource software as a direct consequence of their participation in the program. I had a priviledge to mentor &lt;a href="http://www.derivativezero.com/blog/author/eilidh/" target="_blank"&gt;Eilidh McAdam&lt;/a&gt; and we implemented a &lt;a href="http://fridrich.blogspot.com/2011/11/it-has-been-long-time-since-i-last-time.html" target="_blank"&gt;Visio import filter&lt;/a&gt; that is one of the flagship features of LibreOffice 3.5. Eilidh is now employed by &lt;a href="http://www.lanedo.com/" target="_blank"&gt;Lanedo&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This year, we proposed with Valek Filippov two projects related to reverse-engineered file-formats. The first is the implementation of &lt;a href="http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Implement_Microsoft_Publisher_Import_filter_for_LibreOffice" target="_blank"&gt;MS Publisher import filter for LibreOffice&lt;/a&gt; and the second is to help to &lt;a href="http://wiki.documentfoundation.org/Development/Gsoc/Ideas#Improve_and_extend_the_CorelDraw_Import_filter_for_LibreOffice" target="_blank"&gt;improve and extend the Corel Draw import filter&lt;/a&gt; that will be part of LibreOffice 3.6 release. Both projects require working knowledge of C++ and a lot of good will. Each of the import filters consists of a standalone library and a glue that plugs the library into LibreOffice. These libraries can be built as system libraries and LibreOffice can use them from the system. The advantage of this approach for a student participating at the development is that there is only a minimum need of recompiling LibreOffice if some substantial part of the glue (that is rather small) changes. Therefore, I encourage all of you who are considering applying with LibreOffice for this year's Google Summer of Code to have a close look at those two projects. As a bonus is that if you are successful, you become famous and eventually rich.&lt;/p&gt;&lt;p&gt;You can have a look at &lt;a href="http://cgit.freedesktop.org/libreoffice/libcdr/" target="_blank"&gt;&lt;code&gt;libcdr&lt;/code&gt;&lt;/a&gt;, the horsepower behind the Corel Draw import filter and at the skeleton of &lt;a href="http://cgit.freedesktop.org/~fridrich/libmspub" target="_blank"&gt;&lt;code&gt;libmspub&lt;/code&gt;&lt;/a&gt;, that will be the basis of the Publisher import filter. And don't hesitate to &lt;b&gt;become rich and famous with Google Summer of Code at LibreOffice&lt;/b&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/4435178119409634262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/4435178119409634262'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/03/google-summer-of-code-at-libreoffice.html' title='Google Summer of Code at LibreOffice: become famous and maybe rich!'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-995596367138680466</id><published>2012-01-31T15:56:00.001+01:00</published><updated>2012-01-31T16:03:22.940+01:00</updated><title type='text'>LibreOffice CorelDraw Import filter - don't despise the humble beginnings</title><content type='html'>&lt;p&gt;You might still remember &lt;a href="http://fridrich.blogspot.com/2011/11/it-has-been-long-time-since-i-last-time.html" target="_blank"&gt;some&lt;/a&gt; &lt;a href="http://fridrich.blogspot.com/2011/07/libreoffice-visio-import-filter-round.html" target="_blank"&gt;of&lt;/a&gt; &lt;a href="http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-shaping.html" target="_blank"&gt;my&lt;/a&gt; &lt;a href="http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-first.html" target="_blank"&gt;blogs&lt;/a&gt; about &lt;a href="http://wiki.documentfoundation.org/ReleaseNotes/3.5#Filters" target="_blank"&gt;our new and shiny MS Visio import filter&lt;/a&gt; in the upcoming &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; 3.5.0.&lt;/p&gt;&lt;p&gt;But what about 3.6.0? Is it going to be an exciting version too? Well, the answer depends on what kind of things excite you generally, but for sure, there will be a lot of goodness as usual to make the best free office suite even better.&lt;/p&gt;&lt;p&gt;In my free time, I have been working for some time already on the next graphics import filter for &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt;. This time it will be a CorelDraw import filter. The horse-power is a library, &lt;a href="http://cgit.freedesktop.org/libreoffice/libcdr/" target="_blank"&gt;&lt;code&gt;&lt;b&gt;libcdr&lt;/b&gt;&lt;/code&gt;&lt;/a&gt;. In the same way as &lt;code&gt;libvisio&lt;/code&gt;, &lt;code&gt;libcdr&lt;/code&gt; reuses the API of &lt;code&gt;libwpg&lt;/code&gt; and thus is easily pluggable into &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; reusing all the ODG generator classes of the current &lt;code&gt;writerperfect&lt;/code&gt; module. The importer is currently part of the git master tree.&lt;/p&gt;&lt;p&gt;You might be already shouting: &amp;quot;Where are the screenshots?&amp;quot; I know that a picture speaks louder then hundred words, and so here you are served:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/990shapes_coreldraw7.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/990shapes_coreldraw7_tn.jpg" alt="Shapes in CorelDraw 7"&gt;&lt;/a&gt;&lt;/p&gt;Simple and more complex shapes in CorelDraw 7&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/902shapes_our_draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/902shapes_our_draw_tn.jpg" alt="Shapes in LibreOffice Draw"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The same shapes imported into LibreOffice Draw.&lt;/p&gt;&lt;p&gt;As you can see, it is an initial implementation, which cannot but get better. If you want to participate in this adventure, you can drop around at our IRC channel &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;&lt;code&gt;#libreoffice-dev&lt;/code&gt;&lt;/a&gt; channel at &lt;a href="http://webchat.freenode.net/"&gt;&lt;code&gt;irc.freenode.net&lt;/code&gt;&lt;/a&gt; where a community of smart and friendly developers can direct you.&lt;/p&gt;&lt;p&gt;Stay tuned for more nice pictures as this project advances.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/995596367138680466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/995596367138680466'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/01/libreoffice-coreldraw-import-filter.html' title='LibreOffice CorelDraw Import filter - don&apos;t despise the humble beginnings'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-131040848618390967</id><published>2012-01-25T23:19:00.002+01:00</published><updated>2012-02-09T16:11:19.051+01:00</updated><title type='text'>FOSDEM 2012 - How to make the best of it and become LibreOffice developer</title><content type='html'>&lt;p align="center"&gt;&lt;a href="http://www.fosdem.org"&gt;&lt;img src="http://www.fosdem.org/promo/going-to" alt="I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://fosdem.org/2012/" target="_blank"&gt;FOSDEM 2012&lt;/a&gt; is just round the corner and, as you might know, &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; will have a &lt;a href="http://blog.documentfoundation.org/2012/01/24/libreoffice-devroom-at-fosdem-2012-in-brussels/" target="_blank"&gt;DevRoom&lt;/a&gt; this year too. And, as it was already &lt;a href="http://libregraphicsworld.org/blog/entry/whats-coming-at-fosdem-2012" target="_blank"&gt;publicized&lt;/a&gt;, your servant and Eilidh McAdam of &lt;a href="http://www.freedesktop.org/wiki/Software/libvisio" target="_blank"&gt;libvisio&lt;/a&gt; fame will attend too. The goal of this event will be to help you to become a &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; developer, by helping you to get your first contact with the code from inside.&lt;/p&gt;&lt;p&gt;&lt;b&gt;How to prepare for the event?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;In order to give as many community members the possibility to speak, the presentations will not take more then 15 minutes each. But we will be there for one-to-one contacts and hacking goodness. If you are interested in contributing to our new Visio import filter, or the upcomming Corel Draw and MS Publisher filters, here is what you can do:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Find a bug that is bothering you in the current Visio import filter, or some simple feature that the importer currently does not support&lt;/li&gt;&lt;li&gt;Check out the following libraries:&lt;ul&gt;&lt;li&gt;master branch of libwpd (&lt;code&gt;git clone git://libwpd.git.sourceforge.net/gitroot/libwpd/libwpd&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;STABLE-0-2-0 branch of libwpg (&lt;code&gt;git clone -b STABLE-0-2-0 git://libwpg.git.sourceforge.net/gitroot/libwpg/libwpg&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;master branch of libwps (&lt;code&gt;git clone git://libwps.git.sourceforge.net/gitroot/libwps/libwps&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;master branch of libvisio (&lt;code&gt;git clone git://anongit.freedesktop.org/libreoffice/contrib/libvisio&lt;/code&gt;), and&lt;/li&gt;&lt;li&gt;master branch of libcdr (&lt;code&gt;git clone git://anongit.freedesktop.org/libreoffice/libcdr&lt;/code&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Build them as system libraries and install them in the same order.&lt;/li&gt;&lt;li&gt;Then build LibreOffice according to &lt;a href="http://wiki.documentfoundation.org/Development#Getting_your_first_build_done" target="_blank"&gt;these instructions&lt;/a&gt;. &lt;b&gt;The important thing is to use those system libraries that you just built.&lt;/b&gt; To do so, be sure you added to the configure flags &lt;ul&gt;&lt;li&gt;&lt;code&gt;--with-system-libwpd&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;--with-system-libwpg&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;--with-system-libwps&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;--with-system-libvisio&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;--with-system-libcdr&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;With this kind of build, you will be ready to make the most from your Brussels weekend. Nevetheless, you can drop around at our IRC channel &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;&lt;code&gt;#libreoffice-dev&lt;/code&gt;&lt;/a&gt; channel at &lt;a href="http://webchat.freenode.net/"&gt;&lt;code&gt;irc.freenode.net&lt;/code&gt;&lt;/a&gt; for more information and ideas.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Starting to do it instead of planning to do it ...&lt;/b&gt;&lt;/p&gt;&lt;p&gt;... is the best way to enter the FOSS development. That is why your servant and Eilidh will be around to hold your hand with debugging and finding way to implement your favourite features. We will answer your questions about the library design. We will point you to the place in the code where your bug might linger. And for more complicated stuff, we will debug it with you.&lt;/p&gt;&lt;p&gt;Don't expect us to give you a fish, but we will certainly teach you how to catch it by yourself. And in the same token, you will become a contributor inside a community of smart people that is fun to hang and hack with.&lt;/p&gt;&lt;p&gt;See you in Brussels the 4&lt;sup&gt;th&lt;/sup&gt; and 5&lt;sup&gt;th&lt;/sup&gt; of February 2012.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/131040848618390967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/131040848618390967'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/01/fosdem-2012-how-to-make-best-of-it-and.html' title='FOSDEM 2012 - How to make the best of it and become LibreOffice developer'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-3090181864515858709</id><published>2012-01-02T15:19:00.002+01:00</published><updated>2012-01-02T15:19:41.184+01:00</updated><title type='text'>Take a decision to enter FOSS in 2012</title><content type='html'>&lt;p&gt;So, the year changed again and with it come quite often new decisions. Some swear to work out the superfluous kilos, pounds, or whatever standardized measure your country uses, gained too fast during the festivals. If it is your decision, it is for sure good for your body and I wish you success that goes beyond the act of subscribing to a local gym (and never appearing there after first month).&lt;/p&gt;&lt;p&gt;But this could be also a nice time to take a decision that you were procrastinating with for too long. That one is good for your intellect and programming skills (even though you don't consider yourself a programmer yet). What about starting to contribute to a Free and Open Source Software project (FOSS)?&lt;/p&gt;&lt;p&gt;Sounds interesting? So I have one for your. It is having a big and growing community. It can accomodate all levels of skills. And the impact you will have is multiplied by the wide addoption of the product itself.&lt;/p&gt;&lt;p&gt;Well, you must have guessed right by now. I am speaking about the &lt;a href="http://libreoffice.org"&gt;LibreOffice&lt;/a&gt; project, your natural entry point into the marvelous world of the FOSS.&lt;/p&gt;&lt;p&gt;Whether you are expert or beginner programmer or C++ is sounding Chinese Traditional for you, just find a way to join channel &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;&lt;code&gt;#libreoffice-dev&lt;/code&gt;&lt;/a&gt; channel at &lt;a href="http://webchat.freenode.net/"&gt;&lt;code&gt;irc.freenode.net&lt;/code&gt;&lt;/a&gt; in order to meet other developers and visit our &lt;a href="http://wiki.documentfoundation.org/Development/Easy_Hacks"&gt;Easy Hacks&lt;/a&gt; for ideas where to start.&lt;/p&gt;&lt;p&gt;I promis you that a year from now, you will not regret that you have started. Although, it is quite probable that you will pour a tear over an unused year-pass from the local gym.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3090181864515858709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3090181864515858709'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2012/01/take-decision-to-enter-foss-in-2012.html' title='Take a decision to enter FOSS in 2012'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-2140887962891101559</id><published>2011-11-15T12:34:00.002+01:00</published><updated>2011-11-15T15:23:53.730+01:00</updated><title type='text'>7th ODF Plugfest in Gouda</title><content type='html'>&lt;p&gt;For those that might care, your servant will be attending this week the &lt;a href="http://www.odfplugfest.org/2011-gouda/" target="_blank"&gt;ODF Plugfest #7&lt;/a&gt; in Gouda (Netherlands).&lt;/p&gt;&lt;p&gt;I will have on Friday a short presentation of the &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;best free and open source library for parsing Microsoft Visio Documents&lt;/a&gt;. The other exciting thing is that after more then 6 years of common collaboration I will get to meet personally one of my &lt;a href="http://libwpd.sourceforge.net" target="_blank"&gt;&lt;code&gt;libwpd&lt;/code&gt;&lt;/a&gt; co-maintainers, &lt;a href="http://abicollab.net/documents/download/462/latest/pdf" target=" _blank"&gt;Johannes Marcus Maurer&lt;/a&gt; also know as &lt;a href="http://uwog.net/" target="_blank"&gt;&amp;quot;uwog&amp;quot;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;What an exciting time before us!!!&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/2140887962891101559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/2140887962891101559'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/11/7th-odf-plugfest-in-gouda.html' title='7th ODF Plugfest in Gouda'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-190540897166602854</id><published>2011-11-15T01:25:00.001+01:00</published><updated>2011-11-15T01:26:56.006+01:00</updated><title type='text'>LibreOffice Visio Import filter: the goodness soon on your desktop</title><content type='html'>&lt;p&gt;It has been a long time since I last time blogged about the LibreOffice Visio import filter. My silence did not prevent a pretty cool code from falling gradually into our &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" terget="_blank"&gt;git repository&lt;/a&gt;. To the point where now we are working on the last 5% of features that normally take the 95% of development time. But, let us see what happened since my &lt;a href="http://fridrich.blogspot.com/2011/07/libreoffice-visio-import-filter-round.html" target="_blank"&gt;July blog&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;First of all, &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; was busy as a bee and, in the second half of the Google Summer of Code, implemented support of stylesheets, stencils and basic text. She also debugged and fixed quite a number of imperfections that &lt;a href="http://bugware.livejournal.com/" target="_blank"&gt;Valek&lt;/a&gt; found. Frankly speaking, this Google Summer of Code was by far the best from my point of view. We managed to achieve a very good fidelity of import only in about 3 and half months. Impressive.&lt;/p&gt;&lt;p&gt;During the LibreOffice HackFest weekend in Munich, I had a time to add a support for uniform splines in &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" terget="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt; and to implement the actual import in text on the side of LibreOffice.&lt;p&gt;The next highlight was the fact that the whole team met in Paris during the LibreOffice Conference 2011. It was delight to meet in person &lt;a href="http://bugware.livejournal.com/" target="_blank"&gt;Valek&lt;/a&gt; and &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt;. There is even a photo witnessing this meeting:&lt;p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/399TheTeam.jpg" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/399TheTeam_tn.jpg" alt="The Team at LibreOffice Conference 2011 in Paris"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Valek, me and Eilidh from left to right&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;&lt;p&gt;This conference was not only an occasion to know each other a bit better, but also to improve and add some new features to &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" terget="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt;. During boring parties full of non-developer talk, we withdrew with &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; to some corner and improved together the text import: paragraph and span properties, text box properties, etc. Later on, &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; added initial support for line markers (aka arrows). Recently we implemented emulation of the last Visio primitive that we did not handle before - Infinite Line.&lt;/p&gt;&lt;p&gt;For those that have big piles of Visio documents on their disks, but cannot read on their favourite Linux distribution: Your pain is coming to an end. The LibreOffice Visio Import filter will be part of LibreOffice 3.5 release, which will be the next major release early next year.&lt;/p&gt;&lt;p&gt;And since images speak louder then thousands of words, here are some pics to illustrate our achievements:&lt;/p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;OrgChart.vsd in Visio&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;OrgChart.vsd in Draw&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/391OrgChart_vsd_Visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/391OrgChart_vsd_Visio_tn.jpg" alt="OrgChart.vsd in Visio"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/712OrgChart_vsd_Draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/712OrgChart_vsd_Draw_tn.jpg" alt="OrgChar.vsd in Draw"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;You can see the achievement by comparing with the pictures from my &lt;a href="http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-shaping.html" target="_blank"&gt;June blog&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;DNetwork.vsd in Visio&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;DNetwork.vsd in Draw&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/727DNetwork_vsd_Visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/727DNetwork_vsd_Visio_tn.jpg" alt="DNetwork.vsd in Visio"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/590DNetwork_vsd_Draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/590DNetwork_vsd_Draw_tn.jpg" alt="DNetwork.vsd in Draw"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Compare with the picture from this &lt;a href="http://libregraphicsworld.org/blog/entry/initial-support-for-visio-files-lands-to-libreoffice" target="_blank"&gt;libregraphicsworld.org article&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Calendar.vsd in Visio&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Calendar.vsd in Draw&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/969Calendar_vsd_Visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/969Calendar_vsd_Visio_tn.jpg" alt="Calendar.vsd in Visio"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/142Calendar_vsd_Draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/142Calendar_vsd_Draw_tn.jpg" alt="Calendar.vsd in Draw"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;This picture shows a good mix of the complicated features like&lt;/br&gt;stencils with NURBS, text fields, gradients, stencil text, etc.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;&lt;p&gt;If you are impatient and cannot wait anymore, just grab one of the daily builds uploaded by our tinderboxes &lt;a href="http://dev-builds.libreoffice.org/daily/" target="_blank"&gt;here&lt;/a&gt; and enjoy all that goodness on your own.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/190540897166602854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/190540897166602854'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/11/it-has-been-long-time-since-i-last-time.html' title='LibreOffice Visio Import filter: the goodness soon on your desktop'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-7971280968624688180</id><published>2011-09-15T14:10:00.000+02:00</published><updated>2011-09-15T14:10:10.798+02:00</updated><title type='text'>LibreOffice Visio import filter on libregraphicsworld.org</title><content type='html'>For those that could be interested in my shameless self-promotion, there is some news about the LibreOffice Visio import filter at  &lt;a href="http://libregraphicsworld.org/news.php?readmore=877"&gt;libregraphicsworld.org&lt;/a&gt; web site, accompanied by a &lt;a href="http://libregraphicsworld.org/articles.php?article_id=41"&gt;fine interview with two fine hackers&lt;/a&gt;. So, click and enjoy the wonderful screenshots in a preview of the happiness LibreOffice 3.5 will bring you.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7971280968624688180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7971280968624688180'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/09/libreoffice-visio-import-filter-on.html' title='LibreOffice Visio import filter on libregraphicsworld.org'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-8853981521138259280</id><published>2011-07-08T15:15:00.004+02:00</published><updated>2011-07-08T16:38:57.801+02:00</updated><title type='text'>LibreOffice Visio import filter - round shapes are beautiful</title><content type='html'>&lt;p&gt;Some might be wondering why the Visio import filter project is so quiet. But the answer is easy: we were busy as bees adding new features.&lt;/p&gt;&lt;p&gt;You might remember &lt;a href="http://fridrich.blogspot.com/2011/06/bounding-box-of-svg-elliptical-arc.html" target="_blank"&gt;my blog about the bounding box of an elliptical arc&lt;/a&gt;. It is because &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; added the support of elliptical arcs into &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt;. And then we discovered that &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; did not support elliptical arcs in the path at all, just ignored them. Fortunately, there was &lt;a href="http://cgit.freedesktop.org/libreoffice/libs-gui/commit/?id=246168e94709a5ea7f34914d8e246af0985a9c81" target="_blank"&gt;this patch&lt;/a&gt; of a hacker extraordinaire, &lt;a href="http://blog.thebehrens.net/" target="_blank"&gt;Thorsten&lt;/a&gt; that was used to teach &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; some sane behaviour.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; implemented further the conversion of gradient fill and with this and the support of elliptical arcs, this Visio document:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/314Marketing_visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/314Marketing_visio_tn.jpg" alt="Marketing.vsd in Visio"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;looks in Draw pretty well:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/990Marketing_draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/990Marketing_draw_tn.jpg" alt="Marketing.vsd in Draw"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You will realize that we do not support text in Visio documents yet, but be assured that it is now our top priority feature. It is also worthy to note that the above-mentionned document is actually a document in Visio file-format 6 (used by Visio 2000 and Visio XP). We refactored libvisio the way that our support of both version 6 and 11 is equivalent. Moreover, we implemented two-pass parsing of Visio documents which allows us to draw shapes in a correct order and position them accurately.&lt;/p&gt;&lt;p&gt;In the same line, &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; implemented reading of &lt;a href="http://en.wikipedia.org/wiki/NURBS" target="_blank"&gt;NURBS&lt;/a&gt;, which is pretty tedious since the conversion must be done by approximation, since neither ODF, nor SVG support this kind of non-uniform rational basis splines. For the while, we are approximating them with 50 lineto segments for one spline, but it is our intention to use a serie of smooth cubic splines to achieve as much visual similarity as possible.&lt;/p&gt;&lt;p&gt;The &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt; library now is able to position correctly any point even if it is in a rotated shape that is part of a group rotated differently, which also might be part of another group with a diferent transformation. This allows us to load this Visio document:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/926Halloween_visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/926Halloween_visio_tn.jpg" alt="Halloween in Visio"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;in Draw this way:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/302Halloween_draw.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/302Halloween_draw_tn.jpg" alt="Halloween in Draw"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can see some graphic problems. The missing shapes are polylines that we will very soon correctly support. Nevertheless, this could be another one of my &amp;quot;we all love ODF, but ...&amp;quot; blogs, because some of the visual glitches are given by the fact that &lt;b&gt;OpenDocument Graphics (ODG)&lt;/b&gt; file-format is suboptimal for representing more complex drawings. One is not even able to specify fill-rules or rules of polygon clipping. Clerly, this SVG inside XHTML version, converted using the &lt;code&gt;vsd2xhtml&lt;/code&gt; tool, that is part of the &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;&lt;code&gt;libvisio&lt;/code&gt;&lt;/a&gt; library, is much closer to the original:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.picturestoragebin.com/images/599Halloween_xhtml.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/599Halloween_xhtml_tn.jpg" alt="Halloween - SVG in XHTML"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;So, a bottom line is that the project is well alive and kicking. We even tagged the second alpha release and the tarball is now what &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; master build is using. So, if you build your &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; yourself, you will be able to enjoy the fruits of the work or &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt;'s hands and &amp;mdash; why not &amp;mdash; even start to contribute to this cool and interesting project.&lt;/p&gt;&lt;p&gt;Stay tuned for more news soon ...&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/8853981521138259280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/8853981521138259280'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/07/libreoffice-visio-import-filter-round.html' title='LibreOffice Visio import filter - round shapes are beautiful'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-230316808444797384</id><published>2011-06-20T20:14:00.005+02:00</published><updated>2011-06-20T21:51:15.760+02:00</updated><title type='text'>Bounding Box of an SVG Elliptical Arc</title><content type='html'>&lt;p&gt;We all love ODF, the best and the most vendor-neutral file-format in the Universe and its surroundings. But for sure, we have some spots where we would prefer it to be somehow less cumbersome. My favourite spot is the need to compute the bounding box of the path element when one writes the &lt;code&gt;draw:path&lt;/code&gt; into an OpenDocument Graphics file. Without proper &lt;code&gt;svg:x&lt;/code&gt;, &lt;code&gt;svg:y&lt;/code&gt;, &lt;code&gt;svg:height&lt;/code&gt;, &lt;code&gt;svg:width&lt;/code&gt; and &lt;code&gt;svg:viewBox&lt;/code&gt; values the path will not be correctly placed.&lt;/p&gt;&lt;p&gt;Computing bounding boxes is not so complicated work when everything is a polygon (which is the case in the internal model of &lt;code&gt;basegfx&lt;/code&gt; module), but it becomes a bit more complicated if an application wants to generate paths including elliptical arcs.&lt;/p&gt;&lt;p&gt;I hit this problem about a year ago when I was working during &lt;a href="http://fridrich.blogspot.com/2010/06/hackweek-v-day-1.html" target="_blank"&gt;my hackweek&lt;/a&gt; on an improvement of &lt;a href="http://libwpg.sourceforge.net" target="_blank"&gt;&lt;code&gt;libwpg&lt;/code&gt;&lt;/a&gt;. I tried first to implement the bounding box of an elliptical arc the lazy hacker way, by googling for what other people did. And to my surprise, there is a huge vacuum in what concerns computation of a bounding box of the &amp;quot;&lt;code&gt;A&lt;/code&gt;&amp;quot; element of an SVG path. So, I settled for the lazy hacker's plan B: I abandoned the idea by saying I will handle it later, in the first moment, and by implementing a &lt;a href="http://cgit.freedesktop.org/libreoffice/filters/commit/?id=bcca44ddb4b046ce133896be1b47efcee70bd163" target="_blank"&gt;suboptimal solution&lt;/a&gt; in the second time. But, since &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh&lt;/a&gt; did some spectacular progress last week in handling elliptic arcs, my lazyness became the bottle-neck of the progress. So, it was time to remember those nice times when I was warming the benches of the University, dust off my knowledge of mathematical analysis and analytical algebra (or the lack thereof), and try to compute the bounding box of an elliptical arc myself.&lt;/p&gt;&lt;p&gt;And for the purpose of people that might be as lazy as me, I decided to fight my lazyness the second time to give Uncle Google the opportunity to spit out something meaningful, when someone asks it about &amp;quot;Bounding box of an elliptical arc&amp;quot;. Here are the notes:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Compute extremes using parametric description of ellipse&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Let us start from this parametric description of an ellipse:&lt;/p&gt;&lt;p&gt;&lt;code&gt;x(theta) = cx + rx*cos(theta)*cos(phi) - ry*sin(theta)*sin(phi)&lt;/code&gt;&lt;br/&gt;&lt;code&gt;y(theta) = cy + rx*cos(theta)*sin(phi) + ry*sin(theta)*cos(phi)&lt;/code&gt;&lt;/p&gt;&lt;p&gt;where &lt;code&gt;cx&lt;/code&gt; and &lt;code&gt;cy&lt;/code&gt; are the coordinates of the centre of the ellipse, &lt;code&gt;rx&lt;/code&gt; and &lt;code&gt;ry&lt;/code&gt; are the radii and &lt;code&gt;phi&lt;/code&gt; is the x-axis-rotation.&lt;/p&gt;&lt;p&gt;To compute the bounding box of the whole ellipse we need to find for which value of &lt;code&gt;theta&lt;/code&gt; the above mentioned functions reach the local extremes. It means where the first derivatives of &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; according to &lt;code&gt;theta&lt;/code&gt; are zero. We will get this two equations:&lt;/p&gt;&lt;p&gt;&lt;code&gt;0 = -rx*sin(theta)*cos(phi) - ry*cos(theta)*sin(phi)&lt;/code&gt;&lt;br/&gt;&lt;code&gt;0 = -rx*sin(theta)*sin(phi) - ry*cos(theta)*cos(phi)&lt;/code&gt;&lt;/p&gt;&lt;p&gt;which give us two solutions for &lt;code&gt;x&lt;/code&gt;:&lt;/p&gt;&lt;p&gt;&lt;code&gt;theta = -atan(ry*tan(phi)/rx)&lt;/code&gt; and &lt;code&gt;theta = M_PI -atan(ry*tan(phi)/rx)&lt;/code&gt;&lt;/p&gt;&lt;p&gt;and two solutions for &lt;code&gt;y&lt;/code&gt;:&lt;/p&gt;&lt;p&gt;&lt;code&gt;theta = atan(ry/(tan(phi)*rx))&lt;/code&gt; and &lt;code&gt;theta = M_PI + atan(ry/(tan(phi)*rx))&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Compute the center of the ellipse&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Since we know now the values of &lt;code&gt;theta&lt;/code&gt; describing the extremes of our ellipse, we can compute the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; values of the bounding box of the whole ellipse. Just to do that, we still need to know the coordinates of the center of the ellipse, &lt;code&gt;cx&lt;/code&gt; and &lt;code&gt;cy&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;The computation of the center of the ellipse is pretty well described in the &lt;a href="http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter" target="_blank"&gt;Appendix F.6.5&lt;/a&gt; of the &lt;a href="http://www.w3.org/TR/SVG/implnote.html" target="_blank"&gt;SVG standard&lt;/a&gt; and does not need to be reproduced here. Just note that for this we need the coordinates of the starting point of the arc that correspond to the end point of the previous path segment.&lt;/p&gt;&lt;/p&gt;&lt;b&gt;Determine the bounding box of the whole ellipse&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Compute the &lt;code&gt;xmin&lt;/code&gt;, &lt;code&gt;xmax&lt;/code&gt;, &lt;code&gt;ymin&lt;/code&gt; and &lt;code&gt;ymax&lt;/code&gt; using the values of &lt;code&gt;theta&lt;/code&gt; for the local extremes and the newly computed &lt;code&gt;cx&lt;/code&gt; and &lt;code&gt;cy&lt;/code&gt; coordinates. Like this not only we will know the bounding box of the whole ellipse, but we will also know which value of &lt;code&gt;theta&lt;/code&gt; corresponds to maximum and which one to minimum. This knowledge will be later valuable for determining the tightest possible bounding box of a given elliptical arc.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Tightest possible bounding box&lt;/b&gt;&lt;/p&gt;&lt;p&gt;By calculation of the bounding box of the whole ellipse, we now know the rectangle that will contain the ellipse and thus our elliptical arc too. Nonetheless, this rectangle is too big for our arc. So, the next thing is to trim it down so that it becomes the tightest possible rectangle that will still contain the whole arc.&lt;/p&gt;&lt;p&gt;For this task, we will use the polar coordinates rather then the cartesian ones. The principle is that if any of the points corresponding to &lt;code&gt;xmin&lt;/code&gt;, &lt;code&gt;xmax&lt;/code&gt;, &lt;code&gt;ymin&lt;/code&gt; or &lt;code&gt;ymax&lt;/code&gt; of the whole ellipse, lie on the arc they will be be the extremes of the arc too. Nevertheless, if for instance the point &lt;code&gt;ymin&lt;/code&gt; does not lie on the arc, the new &lt;code&gt;ymin&lt;/code&gt; will be the minimum of the &lt;code&gt;y&lt;/code&gt; coordinates of the starting and ending points. In the same way, if the point &lt;code&gt;xmax&lt;/code&gt; does not lie on the arc, the new &lt;code&gt;xmax&lt;/code&gt; will be the maximum of the &lt;code&gt;x&lt;/code&gt; coordinates of the starting and ending points. Whether an extreme does or does not lie on our arc is something trivial to see once the arc is drawn, to determine it programatically will require some efforts.&lt;/p&gt;&lt;p&gt;First, we will compute the coordinates of the points where the whole ellipse touches the bounding box using the parametric description of the ellipse and the values of the &lt;code&gt;theta&lt;/code&gt; that we found out in the previous steps. And for determination whether they lie or not on our arc we will use their position in polar coordinates. We will thus need to compute the angles with the x-axis of the lines going through the center of the ellipse and our extreme points. In other terms, we will compute the angle between vector &lt;code&gt;(1,0)&lt;/code&gt; and vector &lt;code&gt;(x&lt;sub&gt;extreme&lt;/sub&gt;-cx, y&lt;sub&gt;extreme&lt;/sub&gt;-cy)&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;The formula for computing the angle between two vectors is known and mentioned &lt;i&gt;inter alia&lt;/i&gt; as &lt;a href="http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter" target="_blank"&gt;formula F.6.5.4&lt;/a&gt; of the &lt;a href="http://www.w3.org/TR/SVG/implnote.html" target="_blank"&gt;SVG standard&lt;/a&gt;. Generally, the expression to calculate the angle between a vector &lt;code&gt;(ax,ay)&lt;/code&gt; and a vector &lt;code&gt;(bx,by)&lt;/code&gt; is:&lt;/p&gt;&lt;p&gt;&lt;code&gt;(ax * by &gt; ay * bx ? 1.0 : -1.0) * acos( (ax * bx) + (ay * by) / ( sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by) ) )&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;But since we already know that the first vector is &lt;code&gt;(1,0)&lt;/code&gt;, we can simplify it:&lt;/p&gt;&lt;p&gt;&lt;code&gt;(by &gt; 0.0 ? 1.0 : -1.0) * acos( bx / sqrt(bx * bx + by * by) )&lt;/code&gt;, which could be eventually simplified to &lt;code&gt;atan(by / bx)&lt;/code&gt;, but this expression has a potential division by zero and the code would have to handle those border situations in a special way.&lt;/p&gt;&lt;p&gt;Once we know the angles of the extremes, we still need to calculate the angles of the starting and the end points or our arc using exactly the same formula. So we get &lt;code&gt;angle1&lt;/code&gt; corresponding to our starting point and &lt;code&gt;angle2&lt;/code&gt; corresponding to the endpoint. It is necessary to normalize all angles so that they lie in the interval of &lt;code&gt;[0.0, 2.0*M_PI)&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;In case the &lt;code&gt;sweep&lt;/code&gt; flag is 0, the angles are decreasing when the ellipse is drawn. But, for the computation of bounding box the direction of rotation is irrelevant and only complicates the situation. So we swap the angles if the &lt;code&gt;sweep&lt;/code&gt; flag is not set. In this way, we can just check for the absence of the extreme points on our elliptical arc, rotating from &lt;code&gt;angle1&lt;/code&gt; to &lt;code&gt;angle2&lt;/code&gt;. Nevertheless, we have another difficulty with the fact that the angle of 0 radians is the same as the one of 2*M_PI radians. This passage through the 2*M_PI / 0 border is not very easy to handle directly. That is why we swap the points in case where &lt;code&gt;angle1 &gt; angle2&lt;/code&gt; and will not look in this case for absence of the extreme points on the arc, but for their presence on the complement arc that would close the ellipse.&lt;/p&gt;&lt;p&gt;And as my teachers used to say: &amp;quot;Grey is the theory, but green is the tree of life,&amp;quot; here is what it looks like in a plain C++:&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;code&gt;&lt;font color="0000ff"&gt;&lt;strong&gt;#include &lt;font color="#008000"&gt;&amp;lt;algorithm&amp;gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;font color="0000ff"&gt;&lt;strong&gt;#include &lt;font color="#008000"&gt;&amp;lt;cmath&amp;gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color="0000ff"&gt;&lt;strong&gt;#ifndef M_PI&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;font color="0000ff"&gt;&lt;strong&gt;#define M_PI 3.14159265358979323846&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;font color="0000ff"&gt;&lt;strong&gt;#endif&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;inline&lt;/strong&gt; &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;bx&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;by&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;return&lt;/strong&gt; &lt;font color="#2040a0"&gt;fmod&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;M_PI&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;by&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt; ? &lt;font color="#FF0000"&gt;1.0&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#FF0000"&gt;1.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;acos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt; &lt;font color="#2040a0"&gt;bx&lt;/font&gt; / &lt;font color="#2040a0"&gt;sqrt&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;bx&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;bx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;by&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt; &lt;font color="#2040a0"&gt;by&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;)&lt;/font&gt;, &lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;M_PI&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;void&lt;/strong&gt; &lt;font color="#2040a0"&gt;EllpArcBBox&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;x1&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;y1&lt;/font&gt;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;phi&lt;/font&gt;, &lt;strong&gt;bool&lt;/strong&gt; &lt;font color="#2040a0"&gt;largeArc&lt;/font&gt;, &lt;strong&gt;bool&lt;/strong&gt; &lt;font color="#2040a0"&gt;sweep&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;double&lt;/strong&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt;, &lt;strong&gt;double&lt;/strong&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;rx&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#FF0000"&gt;1.0&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ry&lt;/font&gt; &lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#FF0000"&gt;1.0&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;return&lt;/strong&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;const&lt;/strong&gt; &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;x1prime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;const&lt;/strong&gt; &lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;y1prime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;radicant&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;radicant&lt;/font&gt; /&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;cxprime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;cyprime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;radicant&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;ratio&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;/&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;radicant&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;y1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;/&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ratio&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ratio&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;radicant&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#FF0000"&gt;0.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;return&lt;/strong&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="#2040a0"&gt;sqrt&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;radicant&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="#2040a0"&gt;ratio&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt; &lt;strong&gt;else&lt;/strong&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;factor&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;largeArc&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="#2040a0"&gt;sweep&lt;/font&gt; ? &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#FF0000"&gt;1.0&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#FF0000"&gt;1.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sqrt&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;radicant&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;cxprime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;factor&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;y1prime&lt;/font&gt;/&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;cyprime&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;factor&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;x1prime&lt;/font&gt;/&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cxprime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cyprime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cxprime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;cyprime&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#FF0000"&gt;2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;txmin&lt;/font&gt;, &lt;font color="#2040a0"&gt;txmax&lt;/font&gt;, &lt;font color="#2040a0"&gt;tymin&lt;/font&gt;, &lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;0&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;phi&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;M_PI&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;, &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;, &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;, &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;, &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt; &lt;strong&gt;else&lt;/strong&gt; &lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;M_PI&lt;/font&gt; / &lt;font color="#FF0000"&gt;2.0&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;phi&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt;&lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#FF0000"&gt;3.0&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;M_PI&lt;/font&gt;/&lt;font color="#FF0000"&gt;2.0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;, &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;, &lt;font color="#FF0000"&gt;0&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;, &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#FF0000"&gt;0&lt;/font&gt;, &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;else&lt;/strong&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt;&lt;font color="#2040a0"&gt;atan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;tan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;M_PI&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;atan&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;tan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;/&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;xmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt;,&lt;font color="#2040a0"&gt;xmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt;,&lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;tmpY&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;tmpY&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tmpY&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;tmpY&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;atan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;/&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;atan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ry&lt;/font&gt;/&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tan&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;+&lt;/font&gt;&lt;font color="#2040a0"&gt;M_PI&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;ymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt;,&lt;font color="#2040a0"&gt;ymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt;,&lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;tmpX&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tmpX&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tmpX&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt; &lt;font color="4444FF"&gt;+&lt;/font&gt; &lt;font color="#2040a0"&gt;rx&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;cos&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;ry&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;*&lt;/font&gt;&lt;font color="#2040a0"&gt;sin&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;phi&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;tmpX&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;double&lt;/strong&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;getAngle&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;x2&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cx&lt;/font&gt;, &lt;font color="#2040a0"&gt;y2&lt;/font&gt; &lt;font color="4444FF"&gt;-&lt;/font&gt; &lt;font color="#2040a0"&gt;cy&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="#2040a0"&gt;sweep&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt;, &lt;font color="#2040a0"&gt;angle2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;bool&lt;/strong&gt; &lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;false&lt;/strong&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;std&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="4444FF"&gt;:&lt;/font&gt;&lt;font color="#2040a0"&gt;swap&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt;, &lt;font color="#2040a0"&gt;angle2&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;strong&gt;true&lt;/strong&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmin&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmax&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;txmax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;xmax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;x1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;x2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymin&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymin&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymin&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;strong&gt;if&lt;/strong&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;otherArc&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt;&lt;font color="4444FF"&gt;&amp;amp;&lt;/font&gt; &lt;font color="4444FF"&gt;!&lt;/font&gt;&lt;font color="4444FF"&gt;(&lt;/font&gt;&lt;font color="#2040a0"&gt;angle1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymax&lt;/font&gt; &lt;font color="4444FF"&gt;|&lt;/font&gt;&lt;font color="4444FF"&gt;|&lt;/font&gt; &lt;font color="#2040a0"&gt;angle2&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;lt;&lt;/font&gt; &lt;font color="#2040a0"&gt;tymax&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;font color="4444FF"&gt;)&lt;/font&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#2040a0"&gt;ymax&lt;/font&gt; &lt;font color="4444FF"&gt;=&lt;/font&gt; &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;&amp;gt;&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt; ? &lt;font color="#2040a0"&gt;y1&lt;/font&gt; &lt;font color="4444FF"&gt;:&lt;/font&gt; &lt;font color="#2040a0"&gt;y2&lt;/font&gt;&lt;font color="4444FF"&gt;;&lt;/font&gt;&lt;br/&gt;&lt;font color="4444FF"&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/font&gt;&lt;br/&gt;&lt;/p&gt;&lt;/code&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/230316808444797384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/230316808444797384'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/06/bounding-box-of-svg-elliptical-arc.html' title='Bounding Box of an SVG Elliptical Arc'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-138586417359226376</id><published>2011-06-17T16:21:00.003+02:00</published><updated>2011-06-17T16:25:30.500+02:00</updated><title type='text'>LibreOffice Visio import filter - shaping up the baby</title><content type='html'>&lt;p&gt;Maybe you were asking yourself what happened in the Google Summer of Code Visio Import filter project since &lt;a href="http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-first.html"&gt;last week&lt;/a&gt;. But even if you did not ask yourself this necessary question, here is some update about the baby:&lt;/p&gt;&lt;p&gt;The focus this week was mainly on shaping the baby up. &lt;a href="http://www.derivativezero.com/blog/"&gt;Eilidh&lt;/a&gt; added to her blog a photo and an &amp;quot;About&amp;quot; line and then she got exhausted and decided to rest by coding. And it is like this that she implemented polylines, ellipses and circular arcs.&lt;/p&gt;&lt;p&gt;And since the images speak louder then any words, enjoy the look:&lt;/p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Microsoft Visio&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;b&gt;LibreOffice Draw&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/997OrgChart_vsd_page1.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/997OrgChart_vsd_page1_tn.jpg" alt="Visio Page 1"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/805OrgChart_vsd_draw_page.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/805OrgChart_vsd_draw_page_tn.jpg" alt="Draw Page 1"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/631OrgChart_vsd_page2.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/631OrgChart_vsd_page2_tn.jpg" alt="Visio Page 2"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/954OrgChart_vsd_draw_page.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/954OrgChart_vsd_draw_page_tn.jpg" alt="Draw Page 2"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/815OrgChart_vsd_page3.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/815OrgChart_vsd_page3_tn.jpg" alt="Visio Page 3"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;a href="http://www.picturestoragebin.com/images/433OrgChart_vsd_draw_page.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/433OrgChart_vsd_draw_page_tn.jpg" alt="Draw Page 3"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;For those interested in some technical details, or even for those that desire to give hand, the code of the &lt;code&gt;&lt;b&gt;libvisio&lt;/b&gt;&lt;/code&gt; library is living &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;here&lt;/a&gt;. And as usual, for any question or encouragement, feel free to join our &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;#libreoffice-dev&lt;/a&gt; irc channel at &lt;a href="http://webchat.freenode.net/" target="_blank"&gt;irc.freenode.net&lt;/a&gt;, ping &lt;b&gt;&lt;code&gt;tibbylickle&lt;/code&gt;&lt;/b&gt; and pat her back, if she is not lost too deep inside her Emacs.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/138586417359226376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/138586417359226376'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-shaping.html' title='LibreOffice Visio import filter - shaping up the baby'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-3069577193086252752</id><published>2011-06-10T13:49:00.005+02:00</published><updated>2011-06-10T14:35:16.560+02:00</updated><title type='text'>LibreOffice Visio Import filter - first steps of a new baby</title><content type='html'>&lt;p&gt;The &lt;a href="http://code.google.com/soc/" target="_blank"&gt;Google Summer of Code&lt;/a&gt; started some weeks ago and we have &lt;a href="http://www.google-melange.com/gsoc/org/show/google/gsoc2011/libreoffice" target="_blank"&gt;some nice projects&lt;/a&gt; at &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; too.&lt;/p&gt;&lt;p&gt;I am having again this year the privilege to mentor a brilliant student &lt;a href="http://www.derivativezero.com/blog/" target="_blank"&gt;Eilidh McAdam&lt;/a&gt; working on a Microsoft Visio import filter. She got up to the speed very quickly to the point that she is now very intimate with any hexadecimal number of any width. And the first results of her diving into the binary world can speak for themselves.&lt;/p&gt;&lt;p&gt;This Visio document : &lt;a href="http://www.picturestoragebin.com/images/8664pixbyporkoudine_visio.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/8664pixbyporkoudine_visio_tn.jpg" alt="Visio Document"&gt;&lt;/a&gt; can be currently imported into LibreOffice Draw: &lt;a href="http://www.picturestoragebin.com/images/8324pixbyporkoudine.png" target="_blank"&gt;&lt;img src="http://www.picturestoragebin.com/images/8324pixbyporkoudine_tn.jpg" alt="LibreOffice Draw document"&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For those that might be interested in such a detail as the source code of this endavour, the filter is developped as two elements, a shared library living &lt;a href="http://cgit.freedesktop.org/libreoffice/contrib/libvisio/" target="_blank"&gt;here&lt;/a&gt; and an import filter based on this library living in the LibreOffice's &lt;code&gt;writerperfect&lt;/code&gt; module.&lt;/p&gt;&lt;p&gt;For any question or encouragement, feel free to join our &lt;a href="irc://chat.freenode.net/libreoffice-dev"&gt;#libreoffice-dev&lt;/a&gt; irc channel at &lt;a href="http://webchat.freenode.net/" target="_blank"&gt;irc.freenode.net&lt;/a&gt; and ping &lt;b&gt;&lt;code&gt;tibbylickle&lt;/code&gt;&lt;/b&gt; (for encouragements) or &lt;b&gt;&lt;code&gt;Fridrich&lt;/code&gt;&lt;/b&gt; (for blames).&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3069577193086252752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3069577193086252752'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/06/libreoffice-visio-import-filter-first.html' title='LibreOffice Visio Import filter - first steps of a new baby'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-7728215511729177066</id><published>2011-03-03T22:04:00.004+01:00</published><updated>2011-03-03T22:16:57.056+01:00</updated><title type='text'>opensuse-mingw mailing list</title><content type='html'>&lt;p&gt;The &lt;a href="https://build.opensuse.org/project/show?project=windows%3Amingw" target="_blank"&gt;windows::mingw&lt;/a&gt; project and its sub-project quickly gain a true community around themselves. This week, the number of source packages that we build for Windows in &lt;a href="https://build.opensuse.org" target="_blank"&gt;openSUSE Build Service&lt;/a&gt; reached 200 for both the &lt;a href="https://build.opensuse.org/project/show?project=windows%3Amingw%3Awin32" target="_blank"&gt;32-bit&lt;/a&gt; as well as &lt;a href="https://build.opensuse.org/project/show?project=windows%3Amingw%3Awin64" target="_blank"&gt;64-bit&lt;/a&gt; Windows versions.&lt;/p&gt;&lt;p&gt;In order to make the communication between contributors, developers and users easier, we got a sparkling new mailing list at &lt;a href="http://lists.opensuse.org/" target="_blank"&gt;lists.opensuse.org&lt;/a&gt;. You can subscribe it by sending a mail to &lt;a href="mailto:opensuse-mingw+subscribe@opensuse.org"&gt;opensuse-mingw+subscribe@opensuse.org&lt;/a&gt; and enjoy all the intelligent and edifying talk we are having there.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7728215511729177066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7728215511729177066'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/03/opensuse-mingw-mailing-list.html' title='opensuse-mingw mailing list'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-6881702980756622678</id><published>2011-02-26T08:07:00.004+01:00</published><updated>2011-02-26T08:24:19.589+01:00</updated><title type='text'>Voreppe Win32 Tinderbox</title><content type='html'>&lt;p&gt;As you can see &lt;a href="http://tinderbox.go-oo.org/MASTER/status.html" target="_blank"&gt;here&lt;/a&gt;, we have now a working Windows tinderbox. It finished tonight its first successful build of &lt;b&gt;master&lt;/b&gt; branch and will send you nagging e-mails for any breakages from now on. It is our hope that this tinderbox will help us to keep &lt;a href="http://www.libreoffice.org" target="_blank"&gt;LibreOffice&lt;/a&gt; buildable on Windows much easier.&lt;/p&gt;&lt;p&gt;This tinderbox is running Windows Server 2008 R2 Service Pack 1 with Visual Studio 2008 Service Pack 1 and Windows SDK 7.1. The server was graciously given at the disposition of the &lt;a href="http://www.libreoffice.org/" target="_blank"&gt;LibreOffice&lt;/a&gt; community by the French town of &lt;a href="http://www.voreppe.fr/" target="_blank"&gt;Voreppe&lt;/a&gt; through the association &lt;a href="http://www.lamouette.org/" target="_blank"&gt;La Mouette&lt;/a&gt;. I want to personally thank &lt;a href="http://www.voreppe.fr/_Laurent-Godard_.html" target="_blank"&gt;Laurent Godard&lt;/a&gt;, a long-time community member and contributor who was more then instrumental in this transaction.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6881702980756622678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/6881702980756622678'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2011/02/voreppe-win32-tinderbox.html' title='Voreppe Win32 Tinderbox'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-3209108133185065892</id><published>2010-09-11T10:53:00.001+02:00</published><updated>2010-09-11T10:53:56.813+02:00</updated><title type='text'>GNU Make 3.82</title><content type='html'>&lt;p&gt;Just noticed that this kind of constructs chokes GNU Make 3.82&lt;/p&gt;&lt;pre&gt;     test x$CC = x &amp;&amp; CC = gcc&lt;/pre&gt;&lt;p&gt;It can be replaced by&lt;/p&gt;&lt;pre&gt;     CC ?= gcc&lt;/pre&gt;&lt;p&gt;Which can be written in a long form:&lt;/p&gt;&lt;pre&gt;     ifeq ($(origin CC), undefined)
     CC= gcc
     endif&lt;/pre&gt;&lt;p&gt;The other thing that is making this version of GNU Make choke are leading spaces in multi-line rules. Please, &lt;b&gt;use tabs when writing Makefiles&lt;/b&gt;.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3209108133185065892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/3209108133185065892'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2010/09/gnu-make-382.html' title='GNU Make 3.82'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-542424063136942715</id><published>2010-06-07T18:12:00.000+02:00</published><updated>2010-06-07T18:13:10.563+02:00</updated><title type='text'>Hackweek V - Day 1</title><content type='html'>&lt;p&gt;It is Hackweek V here at Novell. And as with all good things that are supposed to start on Monday, and end on Friday, the best thing is that they can start on Friday evening and go until the night becomes a dawn on Monday morning. It is in this spririt that I started to do some preparation to the long overdue release of &lt;a href="http://libwpd.sourceforge.net"&gt;libwpd&lt;/a&gt; &lt;a href="http://libwpg.sourceforge.net"&gt;libwpg&lt;/a&gt; and all projects that are depending on these two. Already during the week-end I fixed some obvious regressions in &lt;a href="http://libwpg.sourceforge.net"&gt;libwpg&lt;/a&gt;, caused by the complete API rewrite. I added some callbacks to the &lt;a href="http://libwpd.sourceforge.net"&gt;libwpd&lt;/a&gt;'s API, so that we can try to support named styles during the 0.9.x series and will not have to break ABI too soon (libwpd 0.8.x were API stable for about 5 years). And today, I was playing with some more regressions and bugs found by &lt;b&gt;sum1&lt;/b&gt;, the best QA person that I know.&lt;/p&gt;&lt;p&gt;The fun part for &lt;a href="http://libwpg.sourceforge.net"&gt;libwpg&lt;/a&gt; was to somehow start to support elliptical arcs so that some &lt;a href="http://go-oo.org/~fridrich/win32/transform-00b1a.svg"&gt;graphs&lt;/a&gt; can have nice smooth edges. This is when one converts the WPG files to SVG. Another fun was generating ODG. Although the ODF 1.1 specifications somehow allow to have elliptical arcs in a path, &lt;a href="http://www.openoffice.org"&gt;the reference implementation of ODF&lt;/a&gt; does not render them. Needless to say that it is pretty tedious task to try to compute a proper bounding box for a path that has only one elliptical element. Just wondering whether ODG can ever become so easy to use and as expressive as SVG. Never mind, just ranting!&lt;/p&gt;&lt;p&gt;The other thing that I wanted to work on during hackweek was the Evolution installer that &lt;a href="http://fridrich.blogspot.com/2010/05/experimental-evolution-installer-for.html"&gt;I spoke about some time ago&lt;/a&gt;. Nonetheless, it would be not wise (the less one can say) to put that as a principal task for oneself. Unless, one is crazy in love with progress-bars and enjoys staring at them for 15-20 minutes in row. But, I can report some progress in there. It is now possible to &lt;a href="http://go-oo.org/~fridrich/win32/langchoice.png"&gt;install only the languages one wants&lt;/a&gt;, although that functionality must be somehow fine-tuned so that we don't publish languages where only one of the &lt;code&gt;*.mo&lt;/code&gt; files is present. Another little work was done in order to make the installer Welcome page a bit more &lt;a href="http://go-oo.org/~fridrich/win32/evo-welcome.png"&gt;sexy&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;For those that would like to debug Evolution on Windows, there is now a debug installer in the dummy rpm file that I mentioned in my &lt;a href="http://fridrich.blogspot.com/2010/05/experimental-evolution-installer-for.html"&gt;previous blog post&lt;/a&gt;. This &lt;a href="http://go-oo.org/~fridrich/win32/evo-debug-installer.png"&gt;debug installer&lt;/a&gt; will install the debug symbols for all &lt;code&gt;DLLs&lt;/code&gt; and &lt;code&gt;EXEs&lt;/code&gt; in the Evolution installer and will add also a working &lt;code&gt;gdb.exe&lt;/code&gt; as a courtesy of your faithful.&lt;/p&gt;&lt;p&gt;Last, but not least, I would like to announce officially that a &lt;a href="http://go-oo.org/~fridrich/win64/Evolution-Win64.png"&gt;64-bit evolution&lt;/a&gt; starts and work on a 64-bit Windows operating system. It can even show some &lt;a href="http://go-oo.org/~fridrich/win64/EvoWin64MeeksBlog.png"&gt;fancy blog entries&lt;/a&gt;. Please, don't focus on the content, or lack thereof :-P, rather enjoy the nice picture) of rss plugin using 64-bit version of &lt;a href="http://webkitgtk.org/"&gt;webkit-gtk&lt;/a&gt;.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/542424063136942715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/542424063136942715'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2010/06/hackweek-v-day-1.html' title='Hackweek V - Day 1'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-4151862975036615121</id><published>2010-05-25T16:48:00.004+02:00</published><updated>2011-06-16T12:40:55.459+02:00</updated><title type='text'>Experimental Evolution installer for Windows</title><content type='html'>&lt;p&gt;It is a pleasure, fun and honour to introduce to the distinguished audience our newest &lt;a href="http://projects.gnome.org/evolution/"&gt;Evolution&lt;/a&gt; installer for Windows. You can find it for instance in &lt;a href="http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_11.4/noarch/"&gt; this repository&lt;/a&gt; of our wonderful &lt;a href="http://build.opensuse.org"&gt;openSUSE Build Service&lt;/a&gt;. The installer is hiding in &lt;code&gt;/usr/i686-pc-mingw32/sys-root/mingw&lt;/code&gt; directory of the &lt;code&gt;mingw32-evolution-installer&lt;/code&gt; RPM. For people that don't know what to do with RPM packages on windows, &lt;a href="http://7-zip.org/"&gt;7-zip&lt;/a&gt; does just a wonderful job at unpacking RPMs even if they use LZMA payload.&lt;/p&gt;&lt;p&gt;As you can see from following pictures,&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32InstallerWelcome.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32InstallerWelcome.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32InstallerFolders.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32InstallerFolders.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32InstallerShortCuts.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32InstallerShortCuts.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32InstallerRunning.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32InstallerRunning.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;the functionality offered by the installer is basic for instance. Nevertheless, it does the most important job which is to install Evolution on your windows box.&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32InstallerLaunchEvo.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32InstallerLaunchEvo.png"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;On the first launch, Evolution will register itself as a mail client able to handle mailto protocol and it also registeres the necessary verbs to be able to become default mail client on Windows,&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32SPAD.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32SPAD.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;and on versions of Windows where the start menu Internet and E-mail links are supported, it can install its icon and open verb in that region:&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32DefaultMailer.png"&gt; &lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32DefaultMailer.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Apart of those technicalities, it can be used to read mail:&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32Mail.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32Mail.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;to manage one's contacts and timetables, even to understand why one is feeling suddenly so hot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://projects.gnome.org/evolution/images/screenshots/win32/EvoWin32CalendarWeather.png"&gt;&lt;img src="http://projects.gnome.org/evolution/images/screenshots/win32/thumb_EvoWin32CalendarWeather.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Not to mention that evolution will in principle detect your timezone and even your &lt;a href="http://fridrich.blogspot.com/2010/03/isensnetwork-based-network-monitor-for.html"&gt; online status&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The installer is for the development series of Evolution (2.31.x). It is possible to produce one for the "stable" (2.30.x) branch, but the quality of both branches on Windows is comparable and doing a "stable" installer would be slightly missleading for the user. Having said that, this version is quite usable although, I would not advise anybody to use it in mission-critical environment yet. But if you decide to adventure into this, it will be enriching endavour for all of us. The bugs can be filed in &lt;a href="http://bugzilla.gnome.org"&gt;GNOME Bugzilla&lt;/a&gt; against evolution. Help us to make it better!&lt;/p&gt;&lt;p&gt;&lt;b&gt;OpenSUSE Build Service&lt;/b&gt;&lt;/p&gt;&lt;p&gt;What is really really really cool with this installer is that it is produced completely inside the &lt;a href="http://build.opensuse.org"&gt;openSUSE Build Service&lt;/a&gt;, a wondeful tool, a once-in-a-lifetime innovation. All the binaries are cross-compiled from Linux and the installer is produced by a version of &lt;a href="http://nsis.sourceforge.net/"&gt;Nullsoft Scriptable Install System&lt;/a&gt; running on Linux and producing Windows installers. The installer is automatically regenerated when the rebuild of Evolution is triggered by any event: change in dependencies, change in Evolution version, etc. It requires a minimum maintainance and is a good starting point for improving further. Since such improvement can now be an incremental one building on the top of the existing infrastructure.&lt;/p&gt;&lt;p&gt;I will never say it enough, but &lt;a href="http://build.opensuse.org"&gt;openSUSE Build Service&lt;/a&gt; is one of the best invention on the earth since the &lt;i&gt;Butterbrot&lt;/i&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/4151862975036615121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/4151862975036615121'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2010/05/experimental-evolution-installer-for.html' title='Experimental Evolution installer for Windows'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-1084843187558515195</id><published>2010-03-29T15:39:00.001+02:00</published><updated>2010-03-29T16:20:25.898+02:00</updated><title type='text'>ISensNetwork based network monitor for Evolution</title><content type='html'>&lt;p&gt;These weeks I was using my spare cycles to prepare evolution to be buildable and running before the GNOME 2.30 freeze. One of the things that Evolution for windows was missing was an alternative for the NetworkManager network connection detection module. I crafted one using Windows &lt;a href="http://msdn.microsoft.com/en-us/library/aa377384%28VS.85%29.aspx"&gt;ISensNetwork&lt;/a&gt; COM interface. The result is to be found &lt;a href="http://git.gnome.org/browse/evolution/tree/modules/windows-sens/evolution-windows-sens.c"&gt;here&lt;/a&gt; for those that might be interested in seeing how to implement COM callbacks in plain C.&lt;/p&gt;&lt;p&gt;There are some examples out there showing how to implement ISensNetwork. One of them using heavy ATL framework is to be found &lt;a href="http://support.microsoft.com/kb/321381"&gt;here&lt;/a&gt;. Another, one, using C++ is to be found &lt;a href="http://files.codes-sources.com/fichier.aspx?id=40728&amp;f=Detecteur\detecteur.cpp"&gt;here&lt;/a&gt;. Both examples have a little problem that actually prevents them from being properly used from unprivileged account, although they work well when Administrator runs them. The problem is that the registering of the event subscription will return &lt;code&gt;E_ACCESSDENIED&lt;/code&gt;. Judging from the number of post on different fora when one querries Uncle Google, the solution is not very known. If you have the same problem, please check the &lt;a href="http://go-oo.org/~fridrich/testsens.c.html"&gt;plain C example&lt;/a&gt; that I crafted using the above-mentioned C++ code as a base. I discovered that specifying that the subscription is a per user one, by using &lt;code&gt;IEventSubscription::put_PerUser(..)&lt;/code&gt; method allows your program to register for system events even if it is run as unprivileged user. The &lt;a href="http://go-oo.org/~fridrich/testsens.c"&gt;source code&lt;/a&gt; can be built with different flavours of MinGW and also with Visual Studio and the program installs an icon in the system tray that will notify you when connection status of your computer changes. &lt;/p&gt;&lt;p&gt;By the way, there is not a lot of sample code out there that would use COM from a plain C. Apart &lt;a href="http://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkdnd-win32.c"&gt;excellent code&lt;/a&gt; produced by my colleague and object of mute admiration, &lt;a href="http://tml-blog.blogspot.com/"&gt;Tor Lillqvist&lt;/a&gt;, there is an wonderful serie of articles by Jeff Glatt. It is worth reading for anybody that wants to do COM the real men's way, in plain C. Here are the links to &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc1.aspx"&gt;part 1&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc2.aspx"&gt;part 2&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc3.aspx"&gt;part 3&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5F%5Fc4.aspx"&gt;part 4&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc5.aspx"&gt;part 5&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc6.aspx"&gt;part 6&lt;/a&gt;, &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc7.aspx"&gt;part 7&lt;/a&gt; and &lt;a href="http://www.codeproject.com/KB/COM/com%5Fin%5Fc8.aspx"&gt;part 8&lt;/a&gt;. It is worth to register and get the example code as well as a neat clean html version of the articles. It is enough to download the files linked from the &lt;a href="http://www.codeproject.com/KB/COM/com_in_c8/com_in_c8_src.zip"&gt;part 8&lt;/a&gt; since they are always cumulated with all files from all previous parts.&lt;/p&gt; 
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/1084843187558515195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/1084843187558515195'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2010/03/isensnetwork-based-network-monitor-for.html' title='ISensNetwork based network monitor for Evolution'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-13479614.post-7575066643569328364</id><published>2010-03-02T09:27:00.002+01:00</published><updated>2010-03-02T09:31:08.720+01:00</updated><title type='text'>DBus for windows in windows:mingw repositories</title><content type='html'>&lt;p&gt;Last night two important new packages landed into &lt;code&gt;windows:mingw:win32&lt;/code&gt; and &lt;code&gt;windows:mingw:win64&lt;/code&gt; projects and repositories in &lt;a href="http://build.opensuse.org"&gt;openSUSE build service&lt;/a&gt;: &lt;code&gt;mingw32-dbus-1&lt;/code&gt; and &lt;code&gt;mingw32-dbus-1-glib&lt;/code&gt; glib bindings for 32-bit Windows and &lt;code&gt;mingw64-dbus-1&lt;/code&gt; and &lt;code&gt;mingw64-dbus-1-glib&lt;/code&gt; for 64-bit Windows. Although, they are known to work in certain setting, they might be buggy in others. So, if you build for Windows some package that needs Dbus, please use these rpms to solve that dependency. And if you find bugs, just report them against the corresponding repository. We will take care of investigating and pushing the reports up the stream.&lt;/p&gt;&lt;p&gt;As a nice result of this new packages would be that the development version of &lt;code&gt;evolution-data-server&lt;/code&gt; and &lt;code&gt;evolution&lt;/code&gt; should be buildable now on Windows too. Not tried yet though, but I know someone who did ;-)&lt;/p&gt;&lt;p&gt;Note that the dbus-1 package is based on the latest development tarball (1.3.0) and is brought to the level of recent git master by a patch inside the rpm package. The dbus-1-glib is basically the 0.84 tarball with a little patch allowing cross-compiling and disabling one test that hard-codes the use of Unix sockets.&lt;/p&gt;&lt;p&gt;So, please, use those packages, stress-test them and report all useful information.&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7575066643569328364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13479614/posts/default/7575066643569328364'/><link rel='alternate' type='text/html' href='http://fridrich.blogspot.com/2010/03/dbus-for-windows-in-windowsmingw.html' title='DBus for windows in windows:mingw repositories'/><author><name>Fridrich Strba</name><uri>https://plus.google.com/108382325637135111255</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-sKMwPezPRVs/AAAAAAAAAAI/AAAAAAAAAH8/Fbh9L2_4ZlQ/s512-c/photo.jpg'/></author></entry></feed>