📄 gdiplus_path.cpp
字号:
#include "stdafx.h"
#include "GdiplusShunt.h"
//----------------------------------------------------------------------------
// GraphicsPath APIs
//----------------------------------------------------------------------------
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePathPtr)(GpFillMode brushMode, GpPath **path));
DEFINE_MEMBER(GdipCreatePath);
GpStatus WINGDIPAPI
GdipCreatePath(GpFillMode brushMode, GpPath **path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipCreatePath == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePath);
}
if ( g_GdipCreatePath != NULL )
{
status = (*g_GdipCreatePath)(brushMode, path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePath2Ptr)(GDIPCONST GpPointF* points, GDIPCONST BYTE* data, INT, GpFillMode fillmode, GpPath **path));
DEFINE_MEMBER(GdipCreatePath2);
GpStatus WINGDIPAPI
GdipCreatePath2(GDIPCONST GpPointF* points, GDIPCONST BYTE* data, INT count, GpFillMode fillmode, GpPath **path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipCreatePath2 == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePath2);
}
if ( g_GdipCreatePath2 != NULL )
{
status = (*g_GdipCreatePath2)(points, data, count, fillmode, path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePath2IPtr)(GDIPCONST GpPoint* points, GDIPCONST BYTE* data, INT count, GpFillMode fillmode, GpPath **path));
DEFINE_MEMBER(GdipCreatePath2I);
GpStatus WINGDIPAPI
GdipCreatePath2I(GDIPCONST GpPoint* points, GDIPCONST BYTE* data, INT count, GpFillMode fillmode, GpPath **path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipCreatePath2I == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePath2I);
}
if ( g_GdipCreatePath2I != NULL )
{
status = (*g_GdipCreatePath2I)(points, data, count, fillmode, path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipClonePathPtr)(GpPath* path, GpPath **clonePath));
DEFINE_MEMBER(GdipClonePath);
GpStatus WINGDIPAPI
GdipClonePath(GpPath* path, GpPath **clonePath)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipClonePath == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipClonePath);
}
if ( g_GdipClonePath != NULL )
{
status = (*g_GdipClonePath)(path, clonePath);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipDeletePathPtr)(GpPath* path));
DEFINE_MEMBER(GdipDeletePath);
GpStatus WINGDIPAPI
GdipDeletePath(GpPath* path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipDeletePath == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipDeletePath);
}
if ( g_GdipDeletePath != NULL )
{
status = (*g_GdipDeletePath)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipResetPathPtr)(GpPath* path));
DEFINE_MEMBER(GdipResetPath);
GpStatus WINGDIPAPI
GdipResetPath(GpPath* path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipResetPath == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipResetPath);
}
if ( g_GdipResetPath != NULL )
{
status = (*g_GdipResetPath)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPointCountPtr)(GpPath* path, INT* count));
DEFINE_MEMBER(GdipGetPointCount);
GpStatus WINGDIPAPI
GdipGetPointCount(GpPath* path, INT* count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPointCount == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPointCount);
}
if ( g_GdipGetPointCount != NULL )
{
status = (*g_GdipGetPointCount)(path, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathTypesPtr)(GpPath* path, BYTE* types, INT count));
DEFINE_MEMBER(GdipGetPathTypes);
GpStatus WINGDIPAPI
GdipGetPathTypes(GpPath* path, BYTE* types, INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathTypes == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathTypes);
}
if ( g_GdipGetPathTypes != NULL )
{
status = (*g_GdipGetPathTypes)(path, types, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathPointsPtr)(GpPath* path, GpPointF* points, INT count));
DEFINE_MEMBER(GdipGetPathPoints);
GpStatus WINGDIPAPI
GdipGetPathPoints(GpPath* path, GpPointF* points, INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathPoints == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathPoints);
}
if ( g_GdipGetPathPoints != NULL )
{
status = (*g_GdipGetPathPoints)(path, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI* GdipGetPathPointsIPtr)(GpPath* path, GpPoint* points, INT count));
DEFINE_MEMBER(GdipGetPathPointsI);
GpStatus WINGDIPAPI
GdipGetPathPointsI(GpPath* path, GpPoint* points, INT count)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathPointsI == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathPointsI);
}
if ( g_GdipGetPathPointsI != NULL )
{
status = (*g_GdipGetPathPointsI)(path, points, count);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathFillModePtr)(GpPath *path, GpFillMode *fillmode));
DEFINE_MEMBER(GdipGetPathFillMode);
GpStatus WINGDIPAPI
GdipGetPathFillMode(GpPath *path, GpFillMode *fillmode)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathFillMode == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathFillMode);
}
if ( g_GdipGetPathFillMode != NULL )
{
status = (*g_GdipGetPathFillMode)(path, fillmode);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathFillModePtr)(GpPath *path, GpFillMode fillmode));
DEFINE_MEMBER(GdipSetPathFillMode);
GpStatus WINGDIPAPI
GdipSetPathFillMode(GpPath *path, GpFillMode fillmode)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipSetPathFillMode == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathFillMode);
}
if ( g_GdipSetPathFillMode != NULL )
{
status = (*g_GdipSetPathFillMode)(path, fillmode);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathDataPtr)(GpPath *path, GpPathData* pathData));
DEFINE_MEMBER(GdipGetPathData);
GpStatus WINGDIPAPI
GdipGetPathData(GpPath *path, GpPathData* pathData)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathData == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathData);
}
if ( g_GdipGetPathData != NULL )
{
status = (*g_GdipGetPathData)(path, pathData);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipStartPathFigurePtr)(GpPath *path));
DEFINE_MEMBER(GdipStartPathFigure);
GpStatus WINGDIPAPI
GdipStartPathFigure(GpPath *path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipStartPathFigure == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipStartPathFigure);
}
if ( g_GdipStartPathFigure != NULL )
{
status = (*g_GdipStartPathFigure)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipClosePathFigurePtr)(GpPath *path));
DEFINE_MEMBER(GdipClosePathFigure);
GpStatus WINGDIPAPI
GdipClosePathFigure(GpPath *path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipClosePathFigure == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipClosePathFigure);
}
if ( g_GdipClosePathFigure != NULL )
{
status = (*g_GdipClosePathFigure)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipClosePathFiguresPtr)(GpPath *path));
DEFINE_MEMBER(GdipClosePathFigures);
GpStatus WINGDIPAPI
GdipClosePathFigures(GpPath *path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipClosePathFigures == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipClosePathFigures);
}
if ( g_GdipClosePathFigures != NULL )
{
status = (*g_GdipClosePathFigures)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathMarkerPtr)(GpPath* path));
DEFINE_MEMBER(GdipSetPathMarker);
GpStatus WINGDIPAPI
GdipSetPathMarker(GpPath* path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipSetPathMarker == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathMarker);
}
if ( g_GdipSetPathMarker != NULL )
{
status = (*g_GdipSetPathMarker)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipClearPathMarkersPtr)(GpPath* path));
DEFINE_MEMBER(GdipClearPathMarkers);
GpStatus WINGDIPAPI
GdipClearPathMarkers(GpPath* path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipClearPathMarkers == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipClearPathMarkers);
}
if ( g_GdipClearPathMarkers != NULL )
{
status = (*g_GdipClearPathMarkers)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipReversePathPtr)(GpPath* path));
DEFINE_MEMBER(GdipReversePath);
GpStatus WINGDIPAPI
GdipReversePath(GpPath* path)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipReversePath == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipReversePath);
}
if ( g_GdipReversePath != NULL )
{
status = (*g_GdipReversePath)(path);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathLastPointPtr)(GpPath* path, GpPointF* lastPoint));
DEFINE_MEMBER(GdipGetPathLastPoint);
GpStatus WINGDIPAPI
GdipGetPathLastPoint(GpPath* path, GpPointF* lastPoint)
{
GpStatus status = GdiplusNotInitialized;
if ( g_hGdiplusModule != NULL )
{
if ( g_GdipGetPathLastPoint == NULL )
{
INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathLastPoint);
}
if ( g_GdipGetPathLastPoint != NULL )
{
status = (*g_GdipGetPathLastPoint)(path, lastPoint);
}
}
return status;
}
DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipAddPathLinePtr)(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -