【WPF】Path绘制的迷你命令
Command |
Name |
Description |
F i |
FillRule |
i=0:EvenOdd. i=1:NonZero. |
M x y |
Move |
Moveto (x, y). |
m x y |
Relative move |
Moveto (x0+x, y0+y). |
L x y |
Line |
Drawline to (x, y). |
l x y |
Relative line |
Drawline to (x0+x, y0+y). |
H x |
Horizontal line |
Drawline to (x, y0). |
h x |
Relative horizontal line |
Drawline to (x0+x, y0). |
V y |
Vertical line |
Drawline to (x0, y). |
v y |
Relative vertical line |
Drawline to (x0, y0+y). |
A xr yr a i j x y |
Arc |
Drawarc to (x, y) based on ellipse with radii (xr,yr) rotated a degrees. i=1:IsLargeArc. j=1: Clockwise. |
a xr yr a i j x y |
Relative arc |
Drawarc to (x0+x, y0+y). |
C x1 y1 x2y2 x3 y3 |
CubicBézier |
DrawBézier to (x3, y3) withcontrol points (x1, y1) and (x2, y2). |
c x1 y1 x2y2 x3 y3 |
Relative cubic Bézier |
DrawBézier to (x0+x3,y0+y3) with control points (x0+x1, y0+y1) and (x0+x2, y0+y2). |
S x2 y2 x3 y3 |
Smooth cubic Bézier |
DrawBézier to (x3, y3) with reflected control point and (x2, y2). |
s x2 y2 x3y3 |
Relative smooth cubic Bézier |
DrawBézier to (x0+x3,y0+y3) with reflected control point and (x0+x2, y0+y2). |
Q x1 y1 x2y2 |
Quadratic Bézier |
Drawquadratic Bézier to (x2, y2)with control point (x1, y1). |
q x1 y1 x2y2 |
Relative quadratic Bézier |
Drawquadratic Bézier to (x0+x2,y0+y2) with control point(x0+x1, y0+y1). |
Z z |
Closefigure |
From: 《Application = Code + Markup : A Guide to the Microsoft Windows Presentation Foundation》 by Charles Petzold