📄 gdiplusgraphics.h
字号:
{
return SetStatus(DllExports::GdipFillPie(nativeGraphics,
brush->nativeBrush, x, y,
width, height, startAngle,
sweepAngle));
}
Status FillPie(IN const Brush* brush,
IN const Rect& rect,
IN REAL startAngle,
IN REAL sweepAngle)
{
return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height,
startAngle, sweepAngle);
}
Status FillPie(IN const Brush* brush,
IN INT x,
IN INT y,
IN INT width,
IN INT height,
IN REAL startAngle,
IN REAL sweepAngle)
{
return SetStatus(DllExports::GdipFillPieI(nativeGraphics,
brush->nativeBrush,
x,
y,
width,
height,
startAngle,
sweepAngle));
}
Status FillPath(IN const Brush* brush,
IN const GraphicsPath* path)
{
return SetStatus(DllExports::GdipFillPath(nativeGraphics,
brush->nativeBrush,
path->nativePath));
}
Status FillClosedCurve(IN const Brush* brush,
IN const PointF* points,
IN INT count)
{
return SetStatus(DllExports::GdipFillClosedCurve(nativeGraphics,
brush->nativeBrush,
points, count));
}
Status FillClosedCurve(IN const Brush* brush,
IN const PointF* points,
IN INT count,
IN FillMode fillMode,
IN REAL tension = 0.5f)
{
return SetStatus(DllExports::GdipFillClosedCurve2(nativeGraphics,
brush->nativeBrush,
points, count,
tension, fillMode));
}
Status FillClosedCurve(IN const Brush* brush,
IN const Point* points,
IN INT count)
{
return SetStatus(DllExports::GdipFillClosedCurveI(nativeGraphics,
brush->nativeBrush,
points,
count));
}
Status FillClosedCurve(IN const Brush* brush,
IN const Point* points,
IN INT count,
IN FillMode fillMode,
IN REAL tension = 0.5f)
{
return SetStatus(DllExports::GdipFillClosedCurve2I(nativeGraphics,
brush->nativeBrush,
points, count,
tension, fillMode));
}
Status FillRegion(IN const Brush* brush,
IN const Region* region)
{
return SetStatus(DllExports::GdipFillRegion(nativeGraphics,
brush->nativeBrush,
region->nativeRegion));
}
Status
DrawString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const RectF &layoutRect,
IN const StringFormat *stringFormat,
IN const Brush *brush
)
{
return SetStatus(DllExports::GdipDrawString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&layoutRect,
stringFormat ? stringFormat->nativeFormat : NULL,
brush ? brush->nativeBrush : NULL
));
}
Status
DrawString(
const WCHAR *string,
INT length,
const Font *font,
const PointF &origin,
const Brush *brush
)
{
RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
return SetStatus(DllExports::GdipDrawString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&rect,
NULL,
brush ? brush->nativeBrush : NULL
));
}
Status
DrawString(
const WCHAR *string,
INT length,
const Font *font,
const PointF &origin,
const StringFormat *stringFormat,
const Brush *brush
)
{
RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
return SetStatus(DllExports::GdipDrawString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&rect,
stringFormat ? stringFormat->nativeFormat : NULL,
brush ? brush->nativeBrush : NULL
));
}
Status
MeasureString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const RectF &layoutRect,
IN const StringFormat *stringFormat,
OUT RectF *boundingBox,
OUT INT *codepointsFitted = 0,
OUT INT *linesFilled = 0
) const
{
return SetStatus(DllExports::GdipMeasureString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&layoutRect,
stringFormat ? stringFormat->nativeFormat : NULL,
boundingBox,
codepointsFitted,
linesFilled
));
}
Status
MeasureString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const SizeF &layoutRectSize,
IN const StringFormat *stringFormat,
OUT SizeF *size,
OUT INT *codepointsFitted = 0,
OUT INT *linesFilled = 0
) const
{
RectF layoutRect(0, 0, layoutRectSize.Width, layoutRectSize.Height);
RectF boundingBox;
Status status;
if (size == NULL)
{
return SetStatus(InvalidParameter);
}
status = SetStatus(DllExports::GdipMeasureString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&layoutRect,
stringFormat ? stringFormat->nativeFormat : NULL,
size ? &boundingBox : NULL,
codepointsFitted,
linesFilled
));
if (size && status == Ok)
{
size->Width = boundingBox.Width;
size->Height = boundingBox.Height;
}
return status;
}
Status
MeasureString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const PointF &origin,
IN const StringFormat *stringFormat,
OUT RectF *boundingBox
) const
{
RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
return SetStatus(DllExports::GdipMeasureString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&rect,
stringFormat ? stringFormat->nativeFormat : NULL,
boundingBox,
NULL,
NULL
));
}
Status
MeasureString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const RectF &layoutRect,
OUT RectF *boundingBox
) const
{
return SetStatus(DllExports::GdipMeasureString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&layoutRect,
NULL,
boundingBox,
NULL,
NULL
));
}
Status
MeasureString(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const PointF &origin,
OUT RectF *boundingBox
) const
{
RectF rect(origin.X, origin.Y, 0.0f, 0.0f);
return SetStatus(DllExports::GdipMeasureString(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
&rect,
NULL,
boundingBox,
NULL,
NULL
));
}
Status
MeasureCharacterRanges(
IN const WCHAR *string,
IN INT length,
IN const Font *font,
IN const RectF &layoutRect,
IN const StringFormat *stringFormat,
IN INT regionCount,
OUT Region *regions
) const
{
if (!regions || regionCount <= 0)
{
return InvalidParameter;
}
GpRegion **nativeRegions = new GpRegion* [regionCount];
if (!nativeRegions)
{
return OutOfMemory;
}
for (INT i = 0; i < regionCount; i++)
{
nativeRegions[i] = regions[i].nativeRegion;
}
Status status = SetStatus(DllExports::GdipMeasureCharacterRanges(
nativeGraphics,
string,
length,
font ? font->nativeFont : NULL,
layoutRect,
stringFormat ? stringFormat->nativeFormat : NULL,
regionCount,
nativeRegions
));
delete [] nativeRegions;
return status;
}
Status DrawDriverString(
IN const UINT16 *text,
IN INT length,
IN const Font *font,
IN const Brush *brush,
IN const PointF *positions,
IN INT flags,
IN const Matrix *matrix
)
{
return SetStatus(DllExports::GdipDrawDriverString(
nativeGraphics,
text,
length,
font ? font->nativeFont : NULL,
brush ? brush->nativeBrush : NULL,
positions,
flags,
matrix ? matrix->nativeMatrix : NULL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -