Loose Silverlight 2.0 (13) geometry (1) Overview

Source: Internet
Author: User

Preface:Silverlight 2.0 beta1 has been released and has added many exciting new features: wpf ui framework, rich controls, rich network support, and rich base class library support. This is my study note, which is quite messy, so it is named as the Silverlight 2.0 series.Article.

This topic describes geometry ).

Using the geometry class and other classes derived from it (such as ellipsegeometry, pathgeometry, and combinedgeometry), you can only define the shape of the ry and cannot present yourself. You are not involved in the layout system, its derived class can be used as the content of uielement.

system. object
system. windows. threading. dispatcherobject
system. windows. dependencyobject
system. windows. freezable
system. windows. media. animation. animatable
system. windows. media. geometry
system. windows. media. ellipsegeometry
system. windows. media. geometrygroup
system. windows. media. linegeometry
system. windows. media. pathgeometry
system. windows. media. rectanglegeometry

Geometry allows you to draw two-dimensional geometric figures, such as straight lines, curves, and shapes. You can also define hit test and editing areas, or even define animations.
Freezable: Because it inherits from the freezable class, the geometry class provides some special features: geometry objects can be shared among multiple objects, set as read-only to improve performance, clone, and set as thread security.

Geometory can be presented through the data attribute of the path object. A path object can draw closed or open shapes, multiple shapes, or even curve shapes. Path. Data is used to obtain or set the geometry of the specified shape.
The pathgeometry class provides a method to depict multiple complex graphs composed of arcs, curves, and straight lines.
The core of pathgeometry is the set of pathfigure objects. Pathfigure itself is composed of one or more pathsegment objects. Each of these objects depicts a line segment of the image. There are multiple types of line segments:

Arcsegment creates an elliptical arc between two points.
Beziersegment creates a cubic beiser curve between two points.
Linesegment creates a straight line between two points.
Polybeziersegment creates a series of cubic besels.
Polylinesegment creates a series of straight lines.
Polyquadraticbeziersegment creates a series of secondary besels.
Quadraticbeziersegment creates a secondary besell curve.

The startpoint attribute of pathfigure specifies the start point of the first line segment. Each line segment is the end point of the preceding line segment as the starting point.

Composite ry: You can create a composite ry object using geometrygroup.

· The geometrygroup class creates a ry object combination that it contains, but does not merge its area. You can add any number of ry objects to geometrygroup.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.