{"id":57,"date":"2011-03-15T14:24:00","date_gmt":"2011-03-15T14:24:00","guid":{"rendered":"https:\/\/wdev-blog.azurewebsites.net\/index.php\/2011\/03\/15\/geometry-and-mini-language\/"},"modified":"2011-03-15T14:24:00","modified_gmt":"2011-03-15T14:24:00","slug":"geometry-and-mini-language","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2011\/03\/15\/geometry-and-mini-language\/","title":{"rendered":"Geometry and Mini-Language"},"content":{"rendered":"<div>StreamGeometry is a light-weight alternative to the PathGeometry class for<\/div>\n<div>\n<div>creating complex geometric shapes. You can use StreamGeometry when you<\/div>\n<div>need to describe a complex geometry but don\u2019t want the overhead of supporting<\/div>\n<div>data binding, animation, and modification.<\/div>\n<\/div>\n<div><\/div>\n<div>\n<div>There are two classes in WPF that provide the mini-language for describing<\/div>\n<div>geometric paths: StreamGeometry, and PathFigureCollection. You need to use<\/div>\n<div>the StreamGeometry mini-language when you set a property of the Geometry<\/div>\n<div>type, such as the Data property of a Path element.<\/div>\n<p><\/p>\n<pre><code>&lt;path stroke=\"Blue\" data=\"M 100 120 L 200 120 L 200 220 L 100 170\"&gt;<br \/>&lt;\/path&gt;<br \/><\/code><\/pre>\n<p><\/p>\n<div>This path uses a sequence of four commands. The first command, M, creates the<br \/>PathFigure and sets the starting point to (100, 120). The following three<br \/>commands (L) create line segments.<\/div>\n<div><\/div>\n<p>See also Mini-Language in <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms752293.aspx\">MSDN<\/a><\/p>\n<div>From the book of <i>Practical WPF Graphics Programming<\/i><\/div>\n<\/div>\n<pre><code><br \/>L endPoint : The end point of the line.<br \/>H x : The x-coordinate of the end point of the line.<br \/>V y : The y-coordinate of the end point of the line.<br \/><br \/>F0 specifies the EvenOdd fill rule.<br \/>F1 specifies the Nonzero fill rule.<br \/>An uppercase M indicates that startPoint is an absolute value; a lowercase m indicates that startPoint is an offset to the previous point<br \/><br \/>C controlPoint1 controlPoint2 endPoint : Cubic Bezier Curve Command<br \/>A size rotationAngle isLargeArcFlag sweepDirectionFlag endPoint : Creates an elliptical arc between the current point and the specified end point.<br \/><br \/>Z : Ends the current figure and creates a line that connects the current point to the starting point of the figure. <br \/><br \/><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>StreamGeometry is a light-weight alternative to the PathGeometry class for creating complex geometric shapes. You can use StreamGeometry when you need to describe a complex geometry but don\u2019t want the overhead of supporting data binding, animation, and modification. There are two classes in WPF that provide the mini-language for describing geometric paths: StreamGeometry, and PathFigureCollection. &hellip; <a href=\"http:\/\/panahy.nl\/index.php\/2011\/03\/15\/geometry-and-mini-language\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Geometry and Mini-Language&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[51],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":0,"uagb_excerpt":"StreamGeometry is a light-weight alternative to the PathGeometry class for creating complex geometric shapes. You can use StreamGeometry when you need to describe a complex geometry but don\u2019t want the overhead of supporting data binding, animation, and modification. There are two classes in WPF that provide the mini-language for describing geometric paths: StreamGeometry, and PathFigureCollection.&hellip;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/57"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":0,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}