[SDK][INCLUDE] Refinement of Gdiplus headers (#2217)

Define getNat helper functions in gdiplusbase.h and use them. CORE-16585
This commit is contained in:
Katayama Hirofumi MZ 2020-01-01 13:53:30 +09:00 committed by GitHub
parent 9ba5594599
commit 84de8c3f25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 105 additions and 100 deletions

View file

@ -19,12 +19,6 @@
#ifndef _GDIPLUSPEN_H
#define _GDIPLUSPEN_H
class CustomLineCap;
// get native
GpCustomLineCap *&
getNat(const CustomLineCap *cap);
class Pen : public GdiplusBase
{
public:
@ -33,7 +27,7 @@ class Pen : public GdiplusBase
Pen(const Brush *brush, REAL width = 1.0f) : nativePen(NULL)
{
lastStatus = DllExports::GdipCreatePen2(brush->nativeBrush, width, UnitWorld, &nativePen);
lastStatus = DllExports::GdipCreatePen2(getNat(brush), width, UnitWorld, &nativePen);
}
Pen(const Color &color, REAL width = 1.0f) : nativePen(NULL)
@ -218,7 +212,7 @@ class Pen : public GdiplusBase
Status
GetTransform(Matrix *matrix)
{
return SetStatus(DllExports::GdipGetPenTransform(nativePen, matrix->nativeMatrix));
return SetStatus(DllExports::GdipGetPenTransform(nativePen, getNat(matrix)));
}
REAL
@ -235,7 +229,7 @@ class Pen : public GdiplusBase
#if 1
return SetStatus(NotImplemented);
#else
return SetStatus(DllExports::GdipMultiplyPenTransform(nativePen, matrix->nativeMatrix, order));
return SetStatus(DllExports::GdipMultiplyPenTransform(nativePen, getNat(matrix), order));
#endif
}
@ -266,7 +260,7 @@ class Pen : public GdiplusBase
Status
SetBrush(const Brush *brush)
{
GpBrush *theBrush = brush ? brush->nativeBrush : NULL;
GpBrush *theBrush = brush ? getNat(brush) : NULL;
return SetStatus(DllExports::GdipSetPenBrushFill(nativePen, theBrush));
}
@ -353,7 +347,7 @@ class Pen : public GdiplusBase
Status
SetTransform(const Matrix *matrix)
{
GpMatrix *mat = matrix ? matrix->nativeMatrix : NULL;
GpMatrix *mat = matrix ? getNat(matrix) : NULL;
return SetStatus(DllExports::GdipSetPenTransform(nativePen, mat));
}