📄 gdiplusgraphics.h
字号:
));
}
Status MeasureDriverString(
IN const UINT16 *text,
IN INT length,
IN const Font *font,
IN const PointF *positions,
IN INT flags,
IN const Matrix *matrix,
OUT RectF *boundingBox
) const
{
return SetStatus(DllExports::GdipMeasureDriverString(
nativeGraphics,
text,
length,
font ? font->nativeFont : NULL,
positions,
flags,
matrix ? matrix->nativeMatrix : NULL,
boundingBox
));
}
// Draw a cached bitmap on this graphics destination offset by
// x, y. Note this will fail with WrongState if the CachedBitmap
// native format differs from this Graphics.
Status DrawCachedBitmap(IN CachedBitmap *cb,
IN INT x,
IN INT y)
{
return SetStatus(DllExports::GdipDrawCachedBitmap(
nativeGraphics,
cb->nativeCachedBitmap,
x, y
));
}
Status DrawImage(IN Image* image,
IN const PointF& point)
{
return DrawImage(image, point.X, point.Y);
}
Status DrawImage(IN Image* image,
IN REAL x,
IN REAL y)
{
return SetStatus(DllExports::GdipDrawImage(nativeGraphics,
image ? image->nativeImage
: NULL,
x,
y));
}
Status DrawImage(IN Image* image,
IN const RectF& rect)
{
return DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
}
Status DrawImage(IN Image* image,
IN REAL x,
IN REAL y,
IN REAL width,
IN REAL height)
{
return SetStatus(DllExports::GdipDrawImageRect(nativeGraphics,
image ? image->nativeImage
: NULL,
x,
y,
width,
height));
}
Status DrawImage(IN Image* image,
IN const Point& point)
{
return DrawImage(image, point.X, point.Y);
}
Status DrawImage(IN Image* image,
IN INT x,
IN INT y)
{
return SetStatus(DllExports::GdipDrawImageI(nativeGraphics,
image ? image->nativeImage
: NULL,
x,
y));
}
Status DrawImage(IN Image* image,
IN const Rect& rect)
{
return DrawImage(image,
rect.X,
rect.Y,
rect.Width,
rect.Height);
}
Status DrawImage(IN Image* image,
IN INT x,
IN INT y,
IN INT width,
IN INT height) {
return SetStatus(DllExports::GdipDrawImageRectI(nativeGraphics,
image ? image->nativeImage
: NULL,
x,
y,
width,
height));
}
// Affine Draw Image
// destPoints.length = 3: rect => parallelogram
// destPoints[0] <=> top-left corner of the source rectangle
// destPoints[1] <=> top-right corner
// destPoints[2] <=> bottom-left corner
// destPoints.length = 4: rect => quad
// destPoints[3] <=> bottom-right corner
Status DrawImage(IN Image* image,
IN const PointF* destPoints,
IN INT count)
{
if (count != 3 && count != 4)
return SetStatus(InvalidParameter);
return SetStatus(DllExports::GdipDrawImagePoints(nativeGraphics,
image ? image->nativeImage
: NULL,
destPoints, count));
}
Status DrawImage(IN Image* image,
IN const Point* destPoints,
IN INT count)
{
if (count != 3 && count != 4)
return SetStatus(InvalidParameter);
return SetStatus(DllExports::GdipDrawImagePointsI(nativeGraphics,
image ? image->nativeImage
: NULL,
destPoints,
count));
}
Status DrawImage(IN Image* image,
IN REAL x,
IN REAL y,
IN REAL srcx,
IN REAL srcy,
IN REAL srcwidth,
IN REAL srcheight,
IN Unit srcUnit)
{
return SetStatus(DllExports::GdipDrawImagePointRect(nativeGraphics,
image ? image->nativeImage
: NULL,
x, y,
srcx, srcy,
srcwidth, srcheight, srcUnit));
}
Status DrawImage(IN Image* image,
IN const RectF& destRect,
IN REAL srcx,
IN REAL srcy,
IN REAL srcwidth,
IN REAL srcheight,
IN Unit srcUnit,
IN const ImageAttributes* imageAttributes = NULL,
IN DrawImageAbort callback = NULL,
IN VOID* callbackData = NULL)
{
return SetStatus(DllExports::GdipDrawImageRectRect(nativeGraphics,
image ? image->nativeImage
: NULL,
destRect.X,
destRect.Y,
destRect.Width,
destRect.Height,
srcx, srcy,
srcwidth, srcheight,
srcUnit,
imageAttributes
? imageAttributes->nativeImageAttr
: NULL,
callback,
callbackData));
}
Status DrawImage(IN Image* image,
IN const PointF* destPoints,
IN INT count,
IN REAL srcx,
IN REAL srcy,
IN REAL srcwidth,
IN REAL srcheight,
IN Unit srcUnit,
IN const ImageAttributes* imageAttributes = NULL,
IN DrawImageAbort callback = NULL,
IN VOID* callbackData = NULL)
{
return SetStatus(DllExports::GdipDrawImagePointsRect(nativeGraphics,
image ? image->nativeImage
: NULL,
destPoints, count,
srcx, srcy,
srcwidth,
srcheight,
srcUnit,
imageAttributes
? imageAttributes->nativeImageAttr
: NULL,
callback,
callbackData));
}
Status DrawImage(IN Image* image,
IN INT x,
IN INT y,
IN INT srcx,
IN INT srcy,
IN INT srcwidth,
IN INT srcheight,
IN Unit srcUnit)
{
return SetStatus(DllExports::GdipDrawImagePointRectI(nativeGraphics,
image ? image->nativeImage
: NULL,
x,
y,
srcx,
srcy,
srcwidth,
srcheight,
srcUnit));
}
Status DrawImage(IN Image* image,
IN const Rect& destRect,
IN INT srcx,
IN INT srcy,
IN INT srcwidth,
IN INT srcheight,
IN Unit srcUnit,
IN const ImageAttributes* imageAttributes = NULL,
IN DrawImageAbort callback = NULL,
IN VOID* callbackData = NULL)
{
return SetStatus(DllExports::GdipDrawImageRectRectI(nativeGraphics,
image ? image->nativeImage
: NULL,
destRect.X,
destRect.Y,
destRect.Width,
destRect.Height,
srcx,
srcy,
srcwidth,
srcheight,
srcUnit,
imageAttributes
? imageAttributes->nativeImageAttr
: NULL,
callback,
callbackData));
}
Status DrawImage(IN Image* image,
IN const Point* destPoints,
IN INT count,
IN INT srcx,
IN INT srcy,
IN INT srcwidth,
IN INT srcheight,
IN Unit srcUnit,
IN const ImageAttributes* imageAttributes = NULL,
IN DrawImageAbort callback = NULL,
IN VOID* callbackData = NULL)
{
return SetStatus(DllExports::GdipDrawImagePointsRectI(nativeGraphics,
image ? image->nativeImage
: NULL,
destPoints,
count,
srcx,
srcy,
srcwidth,
srcheight,
srcUnit,
imageAttributes
? imageAttributes->nativeImageAttr
: NULL,
callback,
callbackData));
}
// The following methods are for playing an EMF+ to a graphics
// via the enumeration interface. Each record of the EMF+ is
// sent to the callback (along with the callbackData). Then
// the callback can invoke the Metafile::PlayRecord method
// to play the particular record.
Status
EnumerateMetafile(
IN const Metafile * metafile,
IN const PointF & destPoint,
IN EnumerateMetafileProc callback,
IN VOID * callbackData = NULL,
IN const ImageAttributes * imageAttributes = NULL
)
{
return SetStatus(DllExports::GdipEnumerateMetafileDestPoint(
nativeGraphics,
(const GpMetafile *)(metafile ? metafile->nativeImage:NULL),
destPoint,
callback,
callbackData,
imageAttributes ? imageAttributes->nativeImageAttr : NULL));
}
Status
EnumerateMetafile(
IN const Metafile * metafile,
IN const Point & destPoint,
IN EnumerateMetafileProc callback,
IN VOID * callbackData = NULL,
IN const ImageAttributes * imageAttributes = NULL
)
{
return SetStatus(DllExports::GdipEnumerateMetafileDestPointI(
nativeGraphics,
(const GpMetafile *)(metafile ? metafile->nativeImage:NULL),
destPoint,
callback,
callbackData,
imageAttributes ? imageAttributes->nativeImageAttr : NULL));
}
Status
EnumerateMetafile(
IN const Metafile * metafile,
IN const RectF & destRect,
IN EnumerateMetafileProc callback,
IN VOID * callbackData = NULL,
IN const ImageAttributes * imageAttributes = NULL
)
{
return SetStatus(DllExports::GdipEnumerateMetafileDestRect(
nativeGra
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -