📄 gdiplus_graphics.cpp
字号:
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetDpiY);
}
if ( g_GdipGetDpiY != NULL )
{
status = (*g_GdipGetDpiY)(graphics, dpi);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipTransformPointsPtr)(GpGraphics *graphics, GpCoordinateSpace destSpace,
GpCoordinateSpace srcSpace, GpPointF *points,
INT count));
DEFINE_MEMBER(GdipTransformPoints);
GpStatus WINGDIPAPI
GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace destSpace,
GpCoordinateSpace srcSpace, GpPointF *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipTransformPoints == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipTransformPoints);
}
if ( g_GdipTransformPoints != NULL )
{
status = (*g_GdipTransformPoints)(graphics, destSpace, srcSpace, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipTransformPointsIPtr)(GpGraphics *graphics, GpCoordinateSpace destSpace,
GpCoordinateSpace srcSpace, GpPoint *points,
INT count));
DEFINE_MEMBER(GdipTransformPointsI);
GpStatus WINGDIPAPI
GdipTransformPointsI(GpGraphics *graphics, GpCoordinateSpace destSpace,
GpCoordinateSpace srcSpace, GpPoint *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipTransformPointsI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipTransformPointsI);
}
if ( g_GdipTransformPointsI != NULL )
{
status = (*g_GdipTransformPointsI)(graphics, destSpace, srcSpace, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetNearestColorPtr)(GpGraphics *graphics, ARGB* argb));
DEFINE_MEMBER(GdipGetNearestColor);
GpStatus WINGDIPAPI
GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetNearestColor == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetNearestColor);
}
if ( g_GdipGetNearestColor != NULL )
{
status = (*g_GdipGetNearestColor)(graphics, argb);
}
}
return status;
}
DEFINE_POINTER(HPALETTE (WINGDIPAPI *GdipCreateHalftonePalettePtr)());
DEFINE_MEMBER(GdipCreateHalftonePalette);
// Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
HPALETTE WINGDIPAPI
GdipCreateHalftonePalette()
{
HPALETTE pallette = NULL;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipCreateHalftonePalette == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreateHalftonePalette);
}
if ( g_GdipCreateHalftonePalette != NULL )
{
pallette = (*g_GdipCreateHalftonePalette)();
}
}
return pallette;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawLinePtr)(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
REAL x2, REAL y2));
DEFINE_MEMBER(GdipDrawLine);
GpStatus WINGDIPAPI
GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
REAL x2, REAL y2)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawLine == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawLine);
}
if ( g_GdipDrawLine != NULL )
{
status = (*g_GdipDrawLine)(graphics, pen, x1, y1, x2, y2);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawLineIPtr)(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
INT x2, INT y2));
DEFINE_MEMBER(GdipDrawLineI);
GpStatus WINGDIPAPI
GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
INT x2, INT y2)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawLineI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawLineI);
}
if ( g_GdipDrawLineI != NULL )
{
status = (*g_GdipDrawLineI)(graphics, pen, x1, y1, x2, y2);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawLinesPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points,
INT count));
DEFINE_MEMBER(GdipDrawLines);
GpStatus WINGDIPAPI
GdipDrawLines(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawLines == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawLines);
}
if ( g_GdipDrawLines != NULL )
{
status = (*g_GdipDrawLines)(graphics, pen, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawLinesIPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points,
INT count));
DEFINE_MEMBER(GdipDrawLinesI);
GpStatus WINGDIPAPI
GdipDrawLinesI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawLinesI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawLinesI);
}
if ( g_GdipDrawLinesI != NULL )
{
status = (*g_GdipDrawLinesI)(graphics, pen, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawArcPtr)(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
REAL width, REAL height, REAL startAngle, REAL sweepAngle));
DEFINE_MEMBER(GdipDrawArc);
GpStatus WINGDIPAPI
GdipDrawArc(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawArc == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawArc);
}
if ( g_GdipDrawArc != NULL )
{
status = (*g_GdipDrawArc)(graphics, pen, x, y, width, height, startAngle, sweepAngle);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawArcIPtr)(GpGraphics *graphics, GpPen *pen, INT x, INT y,
INT width, INT height, REAL startAngle, REAL sweepAngle));
DEFINE_MEMBER(GdipDrawArcI);
GpStatus WINGDIPAPI
GdipDrawArcI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
INT width, INT height, REAL startAngle, REAL sweepAngle)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawArcI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawArcI);
}
if ( g_GdipDrawArcI != NULL )
{
status = (*g_GdipDrawArcI)(graphics, pen, x, y, width, height, startAngle, sweepAngle);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawBezierPtr)(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4));
DEFINE_MEMBER(GdipDrawBezier);
GpStatus WINGDIPAPI
GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1,
REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawBezier == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawBezier);
}
if ( g_GdipDrawBezier != NULL )
{
status = (*g_GdipDrawBezier)(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawBezierIPtr)(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
INT x2, INT y2, INT x3, INT y3, INT x4, INT y4));
DEFINE_MEMBER(GdipDrawBezierI);
GpStatus WINGDIPAPI
GdipDrawBezierI(GpGraphics *graphics, GpPen *pen, INT x1, INT y1,
INT x2, INT y2, INT x3, INT y3, INT x4, INT y4)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawBezierI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawBezierI);
}
if ( g_GdipDrawBezierI != NULL )
{
status = (*g_GdipDrawBezierI)(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawBeziersPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points,
INT count));
DEFINE_MEMBER(GdipDrawBeziers);
GpStatus WINGDIPAPI
GdipDrawBeziers(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawBeziers == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawBeziers);
}
if ( g_GdipDrawBeziers != NULL )
{
status = (*g_GdipDrawBeziers)(graphics, pen, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawBeziersIPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points,
INT count));
DEFINE_MEMBER(GdipDrawBeziersI);
GpStatus WINGDIPAPI
GdipDrawBeziersI(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPoint *points,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawBeziersI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawBeziersI);
}
if ( g_GdipDrawBeziersI != NULL )
{
status = (*g_GdipDrawBeziersI)(graphics, pen, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawRectanglePtr)(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
REAL width, REAL height));
DEFINE_MEMBER(GdipDrawRectangle);
GpStatus WINGDIPAPI
GdipDrawRectangle(GpGraphics *graphics, GpPen *pen, REAL x, REAL y,
REAL width, REAL height)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawRectangle == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawRectangle);
}
if ( g_GdipDrawRectangle != NULL )
{
status = (*g_GdipDrawRectangle)(graphics, pen, x, y, width, height);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawRectangleIPtr)(GpGraphics *graphics, GpPen *pen, INT x, INT y,
INT width, INT height));
DEFINE_MEMBER(GdipDrawRectangleI);
GpStatus WINGDIPAPI
GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, INT y,
INT width, INT height)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawRectangleI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawRectangleI);
}
if ( g_GdipDrawRectangleI != NULL )
{
status = (*g_GdipDrawRectangleI)(graphics, pen, x, y, width, height);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawRectanglesPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRectF *rects,
INT count));
DEFINE_MEMBER(GdipDrawRectangles);
GpStatus WINGDIPAPI
GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRectF *rects,
INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDrawRectangles == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDrawRectangles);
}
if ( g_GdipDrawRectangles != NULL )
{
status = (*g_GdipDrawRectangles)(graphics, pen, rects, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDrawRectanglesIPtr)(GpGraphics *graphics, GpPen *pen, GDIPCONST GpRect *rects,
INT count));
DEFINE_MEMBER(GdipDrawRectanglesI);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -