⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdiplus_brush.cpp

📁 Windows Mobile平台上使用GDI+。GDI+功能很强大
💻 CPP
📖 第 1 页 / 共 5 页
字号:
        }
    }
    return status;
}

DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipScaleLineTransformPtr)(GpLineGradient* brush, REAL sx, REAL sy, GpMatrixOrder order));
DEFINE_MEMBER(GdipScaleLineTransform);

GpStatus WINGDIPAPI
GdipScaleLineTransform(GpLineGradient* brush, REAL sx, REAL sy,
                            GpMatrixOrder order)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipScaleLineTransform == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipScaleLineTransform);
        }
        if ( g_GdipScaleLineTransform != NULL )
        {
            status = (*g_GdipScaleLineTransform)(brush, sx, sy, order);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipRotateLineTransformPtr)(GpLineGradient* brush, REAL angle, GpMatrixOrder order));
DEFINE_MEMBER(GdipRotateLineTransform);

GpStatus WINGDIPAPI
GdipRotateLineTransform(GpLineGradient* brush, REAL angle, 
                        GpMatrixOrder order)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipRotateLineTransform == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipRotateLineTransform);
        }
        if ( g_GdipRotateLineTransform != NULL )
        {
            status = (*g_GdipRotateLineTransform)(brush, angle, order);
        }
    }
    return status;
}

//----------------------------------------------------------------------------
// PathGradientBrush APIs
//----------------------------------------------------------------------------

DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePathGradientPtr)(GDIPCONST GpPointF* points,
                                    INT count, GpWrapMode wrapMode, GpPathGradient **polyGradient));
DEFINE_MEMBER(GdipCreatePathGradient);

GpStatus WINGDIPAPI
GdipCreatePathGradient(GDIPCONST GpPointF* points,
                                    INT count,
                                    GpWrapMode wrapMode,
                                    GpPathGradient **polyGradient)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipCreatePathGradient == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePathGradient);
        }
        if ( g_GdipCreatePathGradient != NULL )
        {
            status = (*g_GdipCreatePathGradient)(points, count, wrapMode, polyGradient);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePathGradientIPtr)(GDIPCONST GpPoint* points,
                                    INT count, GpWrapMode wrapMode, GpPathGradient **polyGradient));
DEFINE_MEMBER(GdipCreatePathGradientI);

GpStatus WINGDIPAPI
GdipCreatePathGradientI(GDIPCONST GpPoint* points,
                                    INT count,
                                    GpWrapMode wrapMode,
                                    GpPathGradient **polyGradient)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipCreatePathGradientI == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePathGradientI);
        }
        if ( g_GdipCreatePathGradientI != NULL )
        {
            status = (*g_GdipCreatePathGradientI)(points, count, wrapMode, polyGradient);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipCreatePathGradientFromPathPtr)(GDIPCONST GpPath* path,
                                    GpPathGradient **polyGradient));
DEFINE_MEMBER(GdipCreatePathGradientFromPath);

GpStatus WINGDIPAPI
GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
                                    GpPathGradient **polyGradient)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipCreatePathGradientFromPath == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipCreatePathGradientFromPath);
        }
        if ( g_GdipCreatePathGradientFromPath != NULL )
        {
            status = (*g_GdipCreatePathGradientFromPath)(path, polyGradient);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientCenterColorPtr)(GpPathGradient *brush, ARGB* colors));
DEFINE_MEMBER(GdipGetPathGradientCenterColor);

GpStatus WINGDIPAPI
GdipGetPathGradientCenterColor(GpPathGradient *brush, ARGB* colors)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientCenterColor == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientCenterColor);
        }
        if ( g_GdipGetPathGradientCenterColor != NULL )
        {
            status = (*g_GdipGetPathGradientCenterColor)(brush, colors);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathGradientCenterColorPtr)(GpPathGradient *brush, ARGB colors));
DEFINE_MEMBER(GdipSetPathGradientCenterColor);

GpStatus WINGDIPAPI
GdipSetPathGradientCenterColor(GpPathGradient *brush, ARGB colors)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipSetPathGradientCenterColor == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathGradientCenterColor);
        }
        if ( g_GdipSetPathGradientCenterColor != NULL )
        {
            status = (*g_GdipSetPathGradientCenterColor)(brush, colors);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientSurroundColorsWithCountPtr)(
                        GpPathGradient *brush, ARGB* color, INT* count));
DEFINE_MEMBER(GdipGetPathGradientSurroundColorsWithCount);

GpStatus WINGDIPAPI
GdipGetPathGradientSurroundColorsWithCount(GpPathGradient *brush, ARGB* color, INT* count)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientSurroundColorsWithCount == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientSurroundColorsWithCount);
        }
        if ( g_GdipGetPathGradientSurroundColorsWithCount != NULL )
        {
            status = (*g_GdipGetPathGradientSurroundColorsWithCount)(brush, color, count);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathGradientSurroundColorsWithCountPtr)(
                        GpPathGradient *brush, GDIPCONST ARGB* color, INT* count));
DEFINE_MEMBER(GdipSetPathGradientSurroundColorsWithCount);

GpStatus WINGDIPAPI
GdipSetPathGradientSurroundColorsWithCount(GpPathGradient *brush, GDIPCONST ARGB* color, INT* count)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipSetPathGradientSurroundColorsWithCount == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathGradientSurroundColorsWithCount);
        }
        if ( g_GdipSetPathGradientSurroundColorsWithCount != NULL )
        {
            status = (*g_GdipSetPathGradientSurroundColorsWithCount)(brush, color, count);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientPathPtr)(GpPathGradient *brush, GpPath *path));
DEFINE_MEMBER(GdipGetPathGradientPath);

GpStatus WINGDIPAPI
GdipGetPathGradientPath(GpPathGradient *brush, GpPath *path)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientPath == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientPath);
        }
        if ( g_GdipGetPathGradientPath != NULL )
        {
            status = (*g_GdipGetPathGradientPath)(brush, path);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathGradientPathPtr)(GpPathGradient *brush, GDIPCONST GpPath *path));
DEFINE_MEMBER(GdipSetPathGradientPath);

GpStatus WINGDIPAPI
GdipSetPathGradientPath(GpPathGradient *brush, GDIPCONST GpPath *path)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipSetPathGradientPath == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathGradientPath);
        }
        if ( g_GdipSetPathGradientPath != NULL )
        {
            status = (*g_GdipSetPathGradientPath)(brush, path);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientCenterPointPtr)(
                        GpPathGradient *brush, GpPointF* points));
DEFINE_MEMBER(GdipGetPathGradientCenterPoint);

GpStatus WINGDIPAPI
GdipGetPathGradientCenterPoint(
                        GpPathGradient *brush, GpPointF* points)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientCenterPoint == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientCenterPoint);
        }
        if ( g_GdipGetPathGradientCenterPoint != NULL )
        {
            status = (*g_GdipGetPathGradientCenterPoint)(brush, points);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientCenterPointIPtr)(
                        GpPathGradient *brush, GpPoint* points));
DEFINE_MEMBER(GdipGetPathGradientCenterPointI);

GpStatus WINGDIPAPI
GdipGetPathGradientCenterPointI(GpPathGradient *brush, GpPoint* points)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientCenterPointI == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientCenterPointI);
        }
        if ( g_GdipGetPathGradientCenterPointI != NULL )
        {
            status = (*g_GdipGetPathGradientCenterPointI)(brush, points);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathGradientCenterPointPtr)(
                        GpPathGradient *brush, GDIPCONST GpPointF* points));
DEFINE_MEMBER(GdipSetPathGradientCenterPoint);

GpStatus WINGDIPAPI
GdipSetPathGradientCenterPoint(GpPathGradient *brush, GDIPCONST GpPointF* points)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipSetPathGradientCenterPoint == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathGradientCenterPoint);
        }
        if ( g_GdipSetPathGradientCenterPoint != NULL )
        {
            status = (*g_GdipSetPathGradientCenterPoint)(brush, points);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipSetPathGradientCenterPointIPtr)(
                        GpPathGradient *brush, GDIPCONST GpPoint* points));
DEFINE_MEMBER(GdipSetPathGradientCenterPointI);

GpStatus WINGDIPAPI
GdipSetPathGradientCenterPointI(GpPathGradient *brush, GDIPCONST GpPoint* points)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipSetPathGradientCenterPointI == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipSetPathGradientCenterPointI);
        }
        if ( g_GdipSetPathGradientCenterPointI != NULL )
        {
            status = (*g_GdipSetPathGradientCenterPointI)(brush, points);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientRectPtr)(GpPathGradient *brush, GpRectF *rect));
DEFINE_MEMBER(GdipGetPathGradientRect);

GpStatus WINGDIPAPI
GdipGetPathGradientRect(GpPathGradient *brush, GpRectF *rect)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientRect == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientRect);
        }
        if ( g_GdipGetPathGradientRect != NULL )
        {
            status = (*g_GdipGetPathGradientRect)(brush, rect);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientRectIPtr)(GpPathGradient *brush, GpRect *rect));
DEFINE_MEMBER(GdipGetPathGradientRectI);

GpStatus WINGDIPAPI
GdipGetPathGradientRectI(GpPathGradient *brush, GpRect *rect)
{
    GpStatus status = GdiplusNotInitialized;
    if ( g_hGdiplusModule != NULL )
    {
        if ( g_GdipGetPathGradientRectI == NULL )
        {
            INITIALIZE_MEMBER(g_hGdiplusModule, GdipGetPathGradientRectI);
        }
        if ( g_GdipGetPathGradientRectI != NULL )
        {
            status = (*g_GdipGetPathGradientRectI)(brush, rect);
        }
    }
    return status;
}


DEFINE_POINTER(GpStatus (WINGDIPAPI *GdipGetPathGradientPointCountPtr)(GpPathGradient *brush, INT* count));
DEFINE_MEMBER(GdipGetPathGradientPointCount);

GpStatus WINGDIPAPI
GdipGetPathGradientPointCount(GpPathGradient *brush, INT* count)
{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -