Applying a DrawingBrush
The DrawingBrush
brush enables painting an area with a so called drawing. A drawing, according to the MSDN documentation, can be a shape, an image, a video, text, or other and is an instance of the System.Windows.Media.Drawing
class. The following code sample fills a rectangle with a DrawingBrush
defining a drawing where two ellipses intersect each other:
Other than the brush, it is interesting here how ellipses are declared via EllipseGeometry
objects that are the geometric representation of ellipses and are enclosed within a GeometryGroup
that basically can group different kinds of geometric representations, such as ...
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.