📄 gdipluspath.h
字号:
IN REAL tension)
{
return SetStatus(DllExports::GdipAddPathCurve2I(nativePath,
points,
count,
tension));
}
Status AddCurve(IN const Point* points,
IN INT count,
IN INT offset,
IN INT numberOfSegments,
IN REAL tension)
{
return SetStatus(DllExports::GdipAddPathCurve3I(nativePath,
points,
count,
offset,
numberOfSegments,
tension));
}
Status AddClosedCurve(IN const PointF* points,
IN INT count)
{
return SetStatus(DllExports::GdipAddPathClosedCurve(nativePath,
points,
count));
}
Status AddClosedCurve(IN const PointF* points,
IN INT count,
IN REAL tension)
{
return SetStatus(DllExports::GdipAddPathClosedCurve2(nativePath,
points,
count,
tension));
}
Status AddClosedCurve(IN const Point* points,
IN INT count)
{
return SetStatus(DllExports::GdipAddPathClosedCurveI(nativePath,
points,
count));
}
Status AddClosedCurve(IN const Point* points,
IN INT count,
IN REAL tension)
{
return SetStatus(DllExports::GdipAddPathClosedCurve2I(nativePath,
points,
count,
tension));
}
Status AddRectangle(IN const RectF& rect)
{
return SetStatus(DllExports::GdipAddPathRectangle(nativePath,
rect.X,
rect.Y,
rect.Width,
rect.Height));
}
Status AddRectangles(IN const RectF* rects,
IN INT count)
{
return SetStatus(DllExports::GdipAddPathRectangles(nativePath,
rects,
count));
}
Status AddRectangle(IN const Rect& rect)
{
return SetStatus(DllExports::GdipAddPathRectangleI(nativePath,
rect.X,
rect.Y,
rect.Width,
rect.Height));
}
Status AddRectangles(IN const Rect* rects, INT count)
{
return SetStatus(DllExports::GdipAddPathRectanglesI(nativePath,
rects,
count));
}
Status AddEllipse(IN const RectF& rect)
{
return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height);
}
Status AddEllipse(IN REAL x,
IN REAL y,
IN REAL width,
IN REAL height)
{
return SetStatus(DllExports::GdipAddPathEllipse(nativePath,
x,
y,
width,
height));
}
Status AddEllipse(IN const Rect& rect)
{
return AddEllipse(rect.X, rect.Y, rect.Width, rect.Height);
}
Status AddEllipse(IN INT x,
IN INT y,
IN INT width,
IN INT height)
{
return SetStatus(DllExports::GdipAddPathEllipseI(nativePath,
x,
y,
width,
height));
}
Status AddPie(IN const RectF& rect,
IN REAL startAngle,
IN REAL sweepAngle)
{
return AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle,
sweepAngle);
}
Status AddPie(IN REAL x,
IN REAL y,
IN REAL width,
IN REAL height,
IN REAL startAngle,
IN REAL sweepAngle)
{
return SetStatus(DllExports::GdipAddPathPie(nativePath, x, y, width,
height, startAngle,
sweepAngle));
}
Status AddPie(IN const Rect& rect,
IN REAL startAngle,
IN REAL sweepAngle)
{
return AddPie(rect.X,
rect.Y,
rect.Width,
rect.Height,
startAngle,
sweepAngle);
}
Status AddPie(IN INT x,
IN INT y,
IN INT width,
IN INT height,
IN REAL startAngle,
IN REAL sweepAngle)
{
return SetStatus(DllExports::GdipAddPathPieI(nativePath,
x,
y,
width,
height,
startAngle,
sweepAngle));
}
Status AddPolygon(IN const PointF* points,
IN INT count)
{
return SetStatus(DllExports::GdipAddPathPolygon(nativePath, points,
count));
}
Status AddPolygon(IN const Point* points,
IN INT count)
{
return SetStatus(DllExports::GdipAddPathPolygonI(nativePath, points,
count));
}
Status AddPath(IN const GraphicsPath* addingPath,
IN BOOL connect)
{
GpPath* nativePath2 = NULL;
if(addingPath)
nativePath2 = addingPath->nativePath;
return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2,
connect));
}
Status AddString(
IN const WCHAR *string,
IN INT length,
IN const FontFamily *family,
IN INT style,
IN REAL emSize, // World units
IN const PointF &origin,
IN const StringFormat *format
)
{
RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
return SetStatus(DllExports::GdipAddPathString(
nativePath,
string,
length,
family ? family->nativeFamily : NULL,
style,
emSize,
&rect,
format ? format->nativeFormat : NULL
));
}
Status AddString(
IN const WCHAR *string,
IN INT length,
IN const FontFamily *family,
IN INT style,
IN REAL emSize, // World units
IN const RectF &layoutRect,
IN const StringFormat *format
)
{
return SetStatus(DllExports::GdipAddPathString(
nativePath,
string,
length,
family ? family->nativeFamily : NULL,
style,
emSize,
&layoutRect,
format ? format->nativeFormat : NULL
));
}
Status AddString(
IN const WCHAR *string,
IN INT length,
IN const FontFamily *family,
IN INT style,
IN REAL emSize, // World units
IN const Point &origin,
IN const StringFormat *format
)
{
Rect rect(origin.X, origin.Y, 0, 0);
return SetStatus(DllExports::GdipAddPathStringI(
nativePath,
string,
length,
family ? family->nativeFamily : NULL,
style,
emSize,
&rect,
format ? format->nativeFormat : NULL
));
}
Status AddString(
IN const WCHAR *string,
IN INT length,
IN const FontFamily *family,
IN INT style,
IN REAL emSize, // World units
IN const Rect &layoutRect,
IN const StringFormat *format
)
{
return SetStatus(DllExports::GdipAddPathStringI(
nativePath,
string,
length,
family ? family->nativeFamily : NULL,
style,
emSize,
&layoutRect,
format ? format->nativeFormat : NULL
));
}
Status Transform(IN const Matrix* matrix)
{
if(matrix)
return SetStatus(DllExports::GdipTransformPath(nativePath,
matrix->nativeMatrix));
else
return Ok;
}
// This is not always the tightest bounds.
Status GetBounds(OUT RectF* bounds,
IN const Matrix* matrix = NULL,
IN const Pen* pen = NULL) const;
Status GetBounds(OUT Rect* bounds,
IN const Matrix* matrix = NULL,
IN const Pen* pen = NULL) const;
// Once flattened, the resultant path is made of line segments and
// the original path information is lost. When matrix is NULL the
// identity matrix is assumed.
Status Flatten(IN const Matrix* matrix = NULL,
IN REAL flatness = FlatnessDefault)
{
GpMatrix* nativeMatrix = NULL;
if(matrix)
{
nativeMatrix = matrix->nativeMatrix;
}
return SetStatus(DllExports::GdipFlattenPath(
nativePath,
nativeMatrix,
flatness
));
}
Status Widen(
IN const Pen* pen,
IN const Matrix* matrix = NULL,
IN REAL flatness = FlatnessDefault
)
{
GpMatrix* nativeMatrix = NULL;
if(matrix)
nativeMatrix = matrix->nativeMatrix;
return SetStatus(DllExports::GdipWidenPath(
nativePath,
pen->nativePen,
nativeMatrix,
flatness
));
}
Status Outline(
IN const Matrix *matrix = NULL,
IN REAL flatness = FlatnessDefault
)
{
GpMatrix* nativeMatrix = NULL;
if(matrix)
{
nativeMatrix = matrix->nativeMatrix;
}
return SetStatus(DllExports::GdipWindingModeOutline(
nativePath, nativeMatrix, flatness
));
}
// Once this is called, the resultant path is made of line segments and
// the original path information is lost. When matrix is NULL, the
// identity matrix is assumed.
Status Warp(IN const PointF* destPoints,
IN INT count,
IN const RectF& srcRect,
IN const Matrix* matrix = NULL,
IN WarpMode warpMode = WarpModePerspective,
IN REAL flatness = FlatnessDefault)
{
GpMatrix* nativeMatrix = NULL;
if(matrix)
nativeMatrix = matrix->nativeMatrix;
return SetStatus(DllExports::GdipWarpPath(
nativePath,
nativeMatrix,
destPoints,
count,
srcRect.X,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -