ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2020
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
133 discussions
Start a n
N
ew thread
[reactos] 01/01: [SDK][INCLUDE] Improve gdiplusstringformat.h (#2219)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc60a2125a960f61efbb8…
commit cc60a2125a960f61efbb80dbecc90c026187854d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Jan 1 15:40:46 2020 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Jan 1 15:40:46 2020 +0900 [SDK][INCLUDE] Improve gdiplusstringformat.h (#2219) CORE-16585 --- sdk/include/psdk/gdiplusstringformat.h | 137 ++++++++++++++++++++++++--------- 1 file changed, 100 insertions(+), 37 deletions(-) diff --git a/sdk/include/psdk/gdiplusstringformat.h b/sdk/include/psdk/gdiplusstringformat.h index 9d0804a2fe0..b94f06fff4c 100644 --- a/sdk/include/psdk/gdiplusstringformat.h +++ b/sdk/include/psdk/gdiplusstringformat.h @@ -22,131 +22,194 @@ class StringFormat : public GdiplusBase { public: - StringFormat(INT formatFlags, LANGID language) + StringFormat(INT formatFlags = 0, LANGID language = LANG_NEUTRAL) : nativeFormat(NULL) { + lastStatus = DllExports::GdipCreateStringFormat(formatFlags, language, &nativeFormat); } - StringFormat(const StringFormat *format) + StringFormat(const StringFormat *format) : nativeFormat(NULL) { + lastStatus = DllExports::GdipCloneStringFormat(format ? format->nativeFormat : NULL, &nativeFormat); } - StringFormat *Clone(VOID) + StringFormat * + Clone() const { - return NULL; + GpStringFormat *cloneFormat = NULL; + + lastStatus = DllExports::GdipCloneStringFormat(nativeFormat, &cloneFormat); + if (lastStatus != Ok) + return NULL; + + StringFormat *newFormat = new StringFormat(cloneFormat, lastStatus); + if (!newFormat) + DllExports::GdipDeleteStringFormat(cloneFormat); + return newFormat; } - static const StringFormat *GenericDefault(VOID) + ~StringFormat() { - return NULL; + DllExports::GdipDeleteStringFormat(nativeFormat); } - static const StringFormat *GenericTypographic(VOID) + static const StringFormat * + GenericDefault() { - return NULL; + return NULL; // FIXME } - StringAlignment GetAlignment(VOID) const + static const StringFormat * + GenericTypographic() { - return StringAlignmentNear; + return NULL; // FIXME } - LANGID GetDigitSubstitutionLanguage(VOID) const + StringAlignment + GetAlignment() const { - return 0; + StringAlignment alignment; + SetStatus(DllExports::GdipGetStringFormatAlign(nativeFormat, &alignment)); + return alignment; } - StringDigitSubstitute GetDigitSubstitutionMethod(VOID) const + LANGID + GetDigitSubstitutionLanguage() const { - return StringDigitSubstituteNone; + LANGID language; + SetStatus(DllExports::GdipGetStringFormatDigitSubstitution(nativeFormat, &language, NULL)); + return language; } - INT GetFormatFlags(VOID) const + StringDigitSubstitute + GetDigitSubstitutionMethod() const { - return 0; + StringDigitSubstitute substitute; + SetStatus(DllExports::GdipGetStringFormatDigitSubstitution(nativeFormat, NULL, &substitute)); + return substitute; } - HotkeyPrefix GetHotkeyPrefix(VOID) const + INT + GetFormatFlags() const { - return HotkeyPrefixNone; + INT flags; + SetStatus(DllExports::GdipGetStringFormatFlags(nativeFormat, &flags)); + return flags; } - Status GetLastStatus(VOID) const + HotkeyPrefix + GetHotkeyPrefix() const { - return NotImplemented; + HotkeyPrefix hotkeyPrefix; + SetStatus(DllExports::GdipGetStringFormatHotkeyPrefix(nativeFormat, reinterpret_cast<INT *>(&hotkeyPrefix))); + return hotkeyPrefix; } - StringAlignment GetLineAlignment(VOID) const + Status + GetLastStatus() const { - return StringAlignmentNear; + return lastStatus; } - INT GetMeasurableCharacterRangeCount(VOID) const + StringAlignment + GetLineAlignment() const { - return 0; + StringAlignment alignment; + SetStatus(DllExports::GdipGetStringFormatLineAlign(nativeFormat, &alignment)); + return alignment; } - INT GetTabStopCount(VOID) const + INT + GetMeasurableCharacterRangeCount() const { - return 0; + INT count; + SetStatus(DllExports::GdipGetStringFormatMeasurableCharacterRangeCount(nativeFormat, &count)); + return count; + } + + INT + GetTabStopCount() const + { + INT count; + SetStatus(DllExports::GdipGetStringFormatTabStopCount(nativeFormat, &count)); + return count; } Status GetTabStops(INT count, REAL *firstTabOffset, REAL *tabStops) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetStringFormatTabStops(nativeFormat, count, firstTabOffset, tabStops)); } - StringTrimming GetTrimming(VOID) const + StringTrimming + GetTrimming() const { - return StringTrimmingNone; + StringTrimming trimming; + SetStatus(DllExports::GdipGetStringFormatTrimming(nativeFormat, &trimming)); + return trimming; } Status SetAlignment(StringAlignment align) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatAlign(nativeFormat, align)); } Status SetDigitSubstitution(LANGID language, StringDigitSubstitute substitute) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatDigitSubstitution(nativeFormat, language, substitute)); } Status SetFormatFlags(INT flags) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatFlags(nativeFormat, flags)); } Status SetHotkeyPrefix(HotkeyPrefix hotkeyPrefix) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatHotkeyPrefix(nativeFormat, INT(hotkeyPrefix))); } Status SetLineAlignment(StringAlignment align) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatLineAlign(nativeFormat, align)); } Status SetMeasurableCharacterRanges(INT rangeCount, const CharacterRange *ranges) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatMeasurableCharacterRanges(nativeFormat, rangeCount, ranges)); } Status SetTabStops(REAL firstTabOffset, INT count, const REAL *tabStops) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatTabStops(nativeFormat, firstTabOffset, count, tabStops)); } Status SetTrimming(StringTrimming trimming) { - return NotImplemented; + return SetStatus(DllExports::GdipSetStringFormatTrimming(nativeFormat, trimming)); + } + + protected: + GpStringFormat *nativeFormat; + mutable Status lastStatus; + + StringFormat(GpStringFormat *format, Status status) : nativeFormat(format), lastStatus(status) + { + } + + Status + SetStatus(Status status) const + { + if (status != Ok) + lastStatus = status; + return status; } };
4 years, 11 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Improve gdipluspath.h (#2218)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b35558b46389d10e37a73…
commit b35558b46389d10e37a738f34ba765b0ce109de1 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Jan 1 15:40:05 2020 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Jan 1 15:40:05 2020 +0900 [SDK][INCLUDE] Improve gdipluspath.h (#2218) CORE-16585 --- sdk/include/psdk/gdipluspath.h | 324 +++++++++++++++++++++++++++++------------ 1 file changed, 234 insertions(+), 90 deletions(-) diff --git a/sdk/include/psdk/gdipluspath.h b/sdk/include/psdk/gdipluspath.h index 2d2b3f3f2af..2665bccbb0a 100644 --- a/sdk/include/psdk/gdipluspath.h +++ b/sdk/include/psdk/gdipluspath.h @@ -420,73 +420,89 @@ class GraphicsPath : public GdiplusBase } Status - GetPathPoints(Point *points, INT count) + GetPathPoints(Point *points, INT count) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathPointsI(nativePath, points, count)); } Status - GetPathPoints(PointF *points, INT count) + GetPathPoints(PointF *points, INT count) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathPoints(nativePath, points, count)); } Status - GetPathTypes(BYTE *types, INT count) + GetPathTypes(BYTE *types, INT count) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathTypes(nativePath, types, count)); } INT - GetPointCount() + GetPointCount() const { - return 0; + INT count = 0; + SetStatus(DllExports::GdipGetPointCount(nativePath, &count)); + return count; } BOOL - IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) + IsOutlineVisible(const Point &point, const Pen *pen, const Graphics *g) const { - return FALSE; + return IsOutlineVisible(point.X, point.Y, pen, g); } BOOL - IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) + IsOutlineVisible(REAL x, REAL y, const Pen *pen, const Graphics *g) const { - return FALSE; + GpGraphics *nativeGraphics = g ? getNat(g) : NULL; + GpPen *nativePen = pen ? getNat(pen) : NULL; + BOOL flag = FALSE; + SetStatus(DllExports::GdipIsOutlineVisiblePathPoint(nativePath, x, y, nativePen, nativeGraphics, &flag)); + return flag; } BOOL - IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) + IsOutlineVisible(INT x, INT y, const Pen *pen, const Graphics *g) const { - return FALSE; + GpGraphics *nativeGraphics = g ? getNat(g) : NULL; + GpPen *nativePen = pen ? getNat(pen) : NULL; + BOOL flag = FALSE; + SetStatus(DllExports::GdipIsOutlineVisiblePathPointI(nativePath, x, y, nativePen, nativeGraphics, &flag)); + return flag; } BOOL - IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) + IsOutlineVisible(const PointF &point, const Pen *pen, const Graphics *g) const { - return FALSE; + return IsOutlineVisible(point.X, point.Y, pen, g); } BOOL - IsVisible(REAL x, REAL y, const Graphics *g) + IsVisible(REAL x, REAL y, const Graphics *g) const { - return FALSE; + GpGraphics *nativeGraphics = g ? getNat(g) : NULL; + BOOL flag = FALSE; + SetStatus(DllExports::GdipIsVisiblePathPoint(nativePath, x, y, nativeGraphics, &flag)); + return flag; } BOOL - IsVisible(const PointF &point, const Graphics *g) + IsVisible(const PointF &point, const Graphics *g) const { return IsVisible(point.X, point.Y, g); } BOOL - IsVisible(INT x, INT y, const Graphics *g) + IsVisible(INT x, INT y, const Graphics *g) const { - return FALSE; + GpGraphics *nativeGraphics = g ? getNat(g) : NULL; + BOOL flag = FALSE; + SetStatus(DllExports::GdipIsVisiblePathPointI(nativePath, x, y, nativeGraphics, &flag)); + return flag; } BOOL - IsVisible(const Point &point, const Graphics *g) + IsVisible(const Point &point, const Graphics *g) const { return IsVisible(point.X, point.Y, g); } @@ -494,7 +510,12 @@ class GraphicsPath : public GdiplusBase Status Outline(const Matrix *matrix, REAL flatness) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); // FIXME +#else + GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; + return SetStatus(DllExports::GdipWindingModeOutline(nativePath, nativeMatrix, flatness)); +#endif } Status @@ -601,273 +622,377 @@ class GraphicsPathIterator : public GdiplusBase public: GraphicsPathIterator(GraphicsPath *path) { + GpPathIterator *it = NULL; + GpPath *nativePath = path ? getNat(path) : NULL; + lastStatus = DllExports::GdipCreatePathIter(&it, nativePath); + nativeIterator = it; + } + + ~GraphicsPathIterator() + { + DllExports::GdipDeletePathIter(nativeIterator); } INT CopyData(PointF *points, BYTE *types, INT startIndex, INT endIndex) { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterCopyData(nativeIterator, &resultCount, points, types, startIndex, endIndex)); + return resultCount; } INT Enumerate(PointF *points, BYTE *types, INT count) { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterEnumerate(nativeIterator, &resultCount, points, types, count)); + return resultCount; } INT - GetCount() + GetCount() const { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterGetCount(nativeIterator, &resultCount)); + return resultCount; } Status GetLastStatus() const { - return NotImplemented; + return lastStatus; } INT GetSubpathCount() const { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterGetSubpathCount(nativeIterator, &resultCount)); + return resultCount; } BOOL HasCurve() const { - return FALSE; + BOOL hasCurve; + SetStatus(DllExports::GdipPathIterHasCurve(nativeIterator, &hasCurve)); + return hasCurve; } INT NextMarker(GraphicsPath *path) { - return 0; + INT resultCount; + GpPath *nativePath = path ? getNat(path) : NULL; + SetStatus(DllExports::GdipPathIterNextMarkerPath(nativeIterator, &resultCount, nativePath)); + return resultCount; } INT NextMarker(INT *startIndex, INT *endIndex) { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterNextMarker(nativeIterator, &resultCount, startIndex, endIndex)); + return resultCount; } INT NextPathType(BYTE *pathType, INT *startIndex, INT *endIndex) { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterNextPathType(nativeIterator, &resultCount, pathType, startIndex, endIndex)); + return resultCount; } INT NextSubpath(GraphicsPath *path, BOOL *isClosed) { - return 0; + GpPath *nativePath = path ? getNat(path) : NULL; + INT resultCount; + SetStatus(DllExports::GdipPathIterNextSubpathPath(nativeIterator, &resultCount, nativePath, isClosed)); + return resultCount; } INT NextSubpath(INT *startIndex, INT *endIndex, BOOL *isClosed) { - return 0; + INT resultCount; + SetStatus(DllExports::GdipPathIterNextSubpath(nativeIterator, &resultCount, startIndex, endIndex, isClosed)); + return resultCount; } VOID Rewind() { + SetStatus(DllExports::GdipPathIterRewind(nativeIterator)); + } + + protected: + GpPathIterator *nativeIterator; + mutable Status lastStatus; + + Status + SetStatus(Status status) const + { + if (status != Ok) + lastStatus = status; + return status; } }; class PathGradientBrush : public Brush { public: - PathGradientBrush(const Point *points, INT count, WrapMode wrapMode) + friend class Pen; + + PathGradientBrush(const Point *points, INT count, WrapMode wrapMode = WrapModeClamp) { + GpPathGradient *brush = NULL; + lastStatus = DllExports::GdipCreatePathGradientI(points, count, wrapMode, &brush); + SetNativeBrush(brush); } - PathGradientBrush(const PointF *points, INT count, WrapMode wrapMode) + PathGradientBrush(const PointF *points, INT count, WrapMode wrapMode = WrapModeClamp) { + GpPathGradient *brush = NULL; + lastStatus = DllExports::GdipCreatePathGradient(points, count, wrapMode, &brush); + SetNativeBrush(brush); } PathGradientBrush(const GraphicsPath *path) { + GpPathGradient *brush = NULL; + lastStatus = DllExports::GdipCreatePathGradientFromPath(getNat(path), &brush); + SetNativeBrush(brush); } INT - GetBlendCount() + GetBlendCount() const { - return 0; + INT count = 0; + SetStatus(DllExports::GdipGetPathGradientBlendCount(GetNativeGradient(), &count)); + return count; } Status - GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) + GetBlend(REAL *blendFactors, REAL *blendPositions, INT count) const { - return NotImplemented; + return SetStatus( + DllExports::GdipGetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count)); } Status - GetCenterColor(Color *color) + GetCenterColor(Color *color) const { - return NotImplemented; + if (color != NULL) + return SetStatus(InvalidParameter); + + ARGB argb; + SetStatus(DllExports::GdipGetPathGradientCenterColor(GetNativeGradient(), &argb)); + color->SetValue(argb); + return GetLastStatus(); } Status - GetCenterPoint(Point *point) + GetCenterPoint(Point *point) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathGradientCenterPointI(GetNativeGradient(), point)); } Status - GetCenterPoint(PointF *point) + GetCenterPoint(PointF *point) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathGradientCenterPoint(GetNativeGradient(), point)); } Status - GetFocusScales(REAL *xScale, REAL *yScale) + GetFocusScales(REAL *xScale, REAL *yScale) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathGradientFocusScales(GetNativeGradient(), xScale, yScale)); } BOOL - GetGammaCorrection() + GetGammaCorrection() const { - return FALSE; + BOOL useGammaCorrection; + SetStatus(DllExports::GdipGetPathGradientGammaCorrection(GetNativeGradient(), &useGammaCorrection)); + return useGammaCorrection; } Status - GetGraphicsPath(GraphicsPath *path) + GetGraphicsPath(GraphicsPath *path) const { - return NotImplemented; + if (!path) + return SetStatus(InvalidParameter); + + return SetStatus(DllExports::GdipGetPathGradientPath(GetNativeGradient(), getNat(path))); } INT - GetInterpolationColorCount() + GetInterpolationColorCount() const { - return 0; + INT count = 0; + SetStatus(DllExports::GdipGetPathGradientPresetBlendCount(GetNativeGradient(), &count)); + return count; } Status - GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) + GetInterpolationColors(Color *presetColors, REAL *blendPositions, INT count) const { return NotImplemented; } INT - GetPointCount() + GetPointCount() const { - return 0; + INT count; + SetStatus(DllExports::GdipGetPathGradientPointCount(GetNativeGradient(), &count)); + return count; } Status - GetRectangle(RectF *rect) + GetRectangle(RectF *rect) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathGradientRect(GetNativeGradient(), rect)); } Status - GetRectangle(Rect *rect) + GetRectangle(Rect *rect) const { - return NotImplemented; + return SetStatus(DllExports::GdipGetPathGradientRectI(GetNativeGradient(), rect)); } INT - GetSurroundColorCount() + GetSurroundColorCount() const { - return 0; + INT count; + SetStatus(DllExports::GdipGetPathGradientSurroundColorCount(GetNativeGradient(), &count)); + return count; } Status - GetSurroundColors(Color *colors, INT *count) + GetSurroundColors(Color *colors, INT *count) const { return NotImplemented; } Status - GetTransform(Matrix *matrix) + GetTransform(Matrix *matrix) const { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipGetPathGradientTransform(GetNativeGradient(), getNat(matrix))); +#endif } WrapMode - GetWrapMode() + GetWrapMode() const { - return WrapModeTile; + WrapMode wrapMode; + SetStatus(DllExports::GdipGetPathGradientWrapMode(GetNativeGradient(), &wrapMode)); + return wrapMode; } Status - MultiplyTransform(Matrix *matrix, MatrixOrder order) + MultiplyTransform(Matrix *matrix, MatrixOrder order = MatrixOrderPrepend) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipMultiplyPathGradientTransform(GetNativeGradient(), getNat(matrix), order)); +#endif } Status ResetTransform() { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipResetPathGradientTransform(GetNativeGradient())); +#endif } Status - RotateTransform(REAL angle, MatrixOrder order) + RotateTransform(REAL angle, MatrixOrder order = MatrixOrderPrepend) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipRotatePathGradientTransform(GetNativeGradient(), angle, order)); +#endif } Status - ScaleTransform(REAL sx, REAL sy, MatrixOrder order) + ScaleTransform(REAL sx, REAL sy, MatrixOrder order = MatrixOrderPrepend) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipScalePathGradientTransform(GetNativeGradient(), sx, sy, order)); +#endif } Status SetBlend(REAL *blendFactors, REAL *blendPositions, INT count) { - return NotImplemented; + return SetStatus( + DllExports::GdipSetPathGradientBlend(GetNativeGradient(), blendFactors, blendPositions, count)); } Status SetBlendBellShape(REAL focus, REAL scale) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientSigmaBlend(GetNativeGradient(), focus, scale)); } Status - SetBlendTriangularShape(REAL focus, REAL scale) + SetBlendTriangularShape(REAL focus, REAL scale = 1.0f) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipSetPathGradientLinearBlend(GetNativeGradient(), focus, scale)); +#endif } Status SetCenterColor(const Color &color) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientCenterColor(GetNativeGradient(), color.GetValue())); } Status SetCenterPoint(const Point &point) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientCenterPointI(GetNativeGradient(), const_cast<Point *>(&point))); } Status SetCenterPoint(const PointF &point) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientCenterPoint(GetNativeGradient(), const_cast<PointF *>(&point))); } Status SetFocusScales(REAL xScale, REAL yScale) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientFocusScales(GetNativeGradient(), xScale, yScale)); } Status SetGammaCorrection(BOOL useGammaCorrection) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientGammaCorrection(GetNativeGradient(), useGammaCorrection)); } Status SetGraphicsPath(const GraphicsPath *path) { - return NotImplemented; + if (!path) + return SetStatus(InvalidParameter); + return SetStatus(DllExports::GdipSetPathGradientPath(GetNativeGradient(), getNat(path))); } Status @@ -885,19 +1010,38 @@ class PathGradientBrush : public Brush Status SetTransform(const Matrix *matrix) { - return NotImplemented; +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipSetPathGradientTransform(GetNativeGradient(), getNat(matrix))); +#endif } Status SetWrapMode(WrapMode wrapMode) { - return NotImplemented; + return SetStatus(DllExports::GdipSetPathGradientWrapMode(GetNativeGradient(), wrapMode)); } Status - TranslateTransform(REAL dx, REAL dy, MatrixOrder order) + TranslateTransform(REAL dx, REAL dy, MatrixOrder order = MatrixOrderPrepend) + { +#if 1 + return SetStatus(NotImplemented); +#else + return SetStatus(DllExports::GdipTranslatePathGradientTransform(GetNativeGradient(), dx, dy, order)); +#endif + } + + protected: + GpPathGradient * + GetNativeGradient() const + { + return static_cast<GpPathGradient *>(nativeBrush); + } + + PathGradientBrush() { - return NotImplemented; } };
4 years, 11 months
1
0
0
0
[reactos] 01/01: [SDK][INCLUDE] Refinement of Gdiplus headers (#2217)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=84de8c3f2563a3fb7f433…
commit 84de8c3f2563a3fb7f433d7a06ebc27d5fb6a7df Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Wed Jan 1 13:53:30 2020 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Jan 1 13:53:30 2020 +0900 [SDK][INCLUDE] Refinement of Gdiplus headers (#2217) Define getNat helper functions in gdiplusbase.h and use them. CORE-16585 --- sdk/include/psdk/gdiplusbase.h | 49 +++++++++++++++++++++++++++++++++++ sdk/include/psdk/gdiplusbrush.h | 22 ++++++---------- sdk/include/psdk/gdiplusgraphics.h | 39 +++------------------------- sdk/include/psdk/gdiplusheaders.h | 53 ++++++++++++++++++++++++-------------- sdk/include/psdk/gdipluslinecaps.h | 4 +-- sdk/include/psdk/gdiplusmatrix.h | 4 +-- sdk/include/psdk/gdipluspath.h | 18 +++---------- sdk/include/psdk/gdipluspen.h | 16 ++++-------- 8 files changed, 105 insertions(+), 100 deletions(-) diff --git a/sdk/include/psdk/gdiplusbase.h b/sdk/include/psdk/gdiplusbase.h index 274195c243f..92e3aafc7c5 100644 --- a/sdk/include/psdk/gdiplusbase.h +++ b/sdk/include/psdk/gdiplusbase.h @@ -47,4 +47,53 @@ class GdiplusBase } }; +class Brush; +class CachedBitmap; +class CustomLineCap; +class Font; +class FontCollection; +class FontFamily; +class Graphics; +class GraphicsPath; +class Image; +class ImageAttributes; +class Matrix; +class Metafile; +class Pen; +class Region; + +// get native +GpBrush *& +getNat(const Brush *brush); + +GpCachedBitmap *& +getNat(const CachedBitmap *cb); + +GpCustomLineCap *& +getNat(const CustomLineCap *cap); + +GpFontCollection *& +getNat(const FontCollection *fc); + +GpGraphics *& +getNat(const Graphics *graphics); + +GpPath *& +getNat(const GraphicsPath *path); + +GpImage *& +getNat(const Image *image); + +GpImageAttributes *& +getNat(const ImageAttributes *ia); + +GpMatrix *& +getNat(const Matrix *matrix); + +GpPen *& +getNat(const Pen *pen); + +GpRegion *& +getNat(const Region *region); + #endif /* _GDIPLUSBASE_H */ diff --git a/sdk/include/psdk/gdiplusbrush.h b/sdk/include/psdk/gdiplusbrush.h index 2416135294e..cb98a7a3e22 100644 --- a/sdk/include/psdk/gdiplusbrush.h +++ b/sdk/include/psdk/gdiplusbrush.h @@ -19,8 +19,6 @@ #ifndef _GDIPLUSBRUSH_H #define _GDIPLUSBRUSH_H -class Image; - class Brush : public GdiplusBase { public: @@ -302,7 +300,7 @@ class LinearGradientBrush : public Brush GetTransform(Matrix *matrix) const { GpLineGradient *gradient = GetNativeGradient(); - return SetStatus(DllExports::GdipGetLineTransform(gradient, matrix->nativeMatrix)); + return SetStatus(DllExports::GdipGetLineTransform(gradient, getNat(matrix))); } WrapMode @@ -319,7 +317,7 @@ class LinearGradientBrush : public Brush MultiplyTransform(const Matrix *matrix, MatrixOrder order) { GpLineGradient *gradient = GetNativeGradient(); - return SetStatus(DllExports::GdipMultiplyLineTransform(gradient, matrix->nativeMatrix, order)); + return SetStatus(DllExports::GdipMultiplyLineTransform(gradient, getNat(matrix), order)); } Status @@ -388,7 +386,7 @@ class LinearGradientBrush : public Brush SetTransform(const Matrix *matrix) { GpLineGradient *gradient = GetNativeGradient(); - return SetStatus(DllExports::GdipSetLineTransform(gradient, matrix->nativeMatrix)); + return SetStatus(DllExports::GdipSetLineTransform(gradient, getNat(matrix))); } Status @@ -502,10 +500,6 @@ class SolidBrush : Brush } }; -// get native -GpImage *& -getNat(const Image *image); - class TextureBrush : Brush { public: @@ -520,7 +514,7 @@ class TextureBrush : Brush TextureBrush(Image *image, Rect &dstRect, ImageAttributes *imageAttributes) { GpTexture *texture = NULL; - GpImageAttributes *attrs = imageAttributes ? imageAttributes->nativeImageAttr : NULL; + GpImageAttributes *attrs = imageAttributes ? getNat(imageAttributes) : NULL; lastStatus = DllExports::GdipCreateTextureIA( getNat(image), attrs, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture); SetNativeBrush(texture); @@ -544,7 +538,7 @@ class TextureBrush : Brush TextureBrush(Image *image, RectF &dstRect, ImageAttributes *imageAttributes) { GpTexture *texture = NULL; - GpImageAttributes *attrs = imageAttributes ? imageAttributes->nativeImageAttr : NULL; + GpImageAttributes *attrs = imageAttributes ? getNat(imageAttributes) : NULL; lastStatus = DllExports::GdipCreateTextureIA( getNat(image), attrs, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture); SetNativeBrush(texture); @@ -573,7 +567,7 @@ class TextureBrush : Brush GetTransform(Matrix *matrix) const { GpTexture *texture = GetNativeTexture(); - return SetStatus(DllExports::GdipGetTextureTransform(texture, matrix->nativeMatrix)); + return SetStatus(DllExports::GdipGetTextureTransform(texture, getNat(matrix))); } WrapMode @@ -589,7 +583,7 @@ class TextureBrush : Brush MultiplyTransform(Matrix *matrix, MatrixOrder order = MatrixOrderPrepend) { GpTexture *texture = GetNativeTexture(); - return SetStatus(DllExports::GdipMultiplyTextureTransform(texture, matrix->nativeMatrix, order)); + return SetStatus(DllExports::GdipMultiplyTextureTransform(texture, getNat(matrix), order)); } Status @@ -617,7 +611,7 @@ class TextureBrush : Brush SetTransform(const Matrix *matrix) { GpTexture *texture = GetNativeTexture(); - return SetStatus(DllExports::GdipSetTextureTransform(texture, matrix->nativeMatrix)); + return SetStatus(DllExports::GdipSetTextureTransform(texture, getNat(matrix))); } Status diff --git a/sdk/include/psdk/gdiplusgraphics.h b/sdk/include/psdk/gdiplusgraphics.h index f34c1093cc5..d93dd542694 100644 --- a/sdk/include/psdk/gdiplusgraphics.h +++ b/sdk/include/psdk/gdiplusgraphics.h @@ -19,39 +19,6 @@ #ifndef _GDIPLUSGRAPHICS_H #define _GDIPLUSGRAPHICS_H -class Image; -class ImageAttributes; -class CachedBitmap; -class Region; -class Font; -class GraphicsPath; -class Metafile; - -// get native -GpImage *& -getNat(const Image *image); - -GpPen *& -getNat(const Pen *pen); - -GpBrush *& -getNat(const Brush *brush); - -GpCachedBitmap *& -getNat(const CachedBitmap *cb); - -GpImageAttributes *& -getNat(const ImageAttributes *ia); - -GpRegion *& -getNat(const Region *region); - -GpMatrix *& -getNat(const Matrix *matrix); - -GpPath *& -getNat(const GraphicsPath *path); - class Graphics : public GdiplusBase { friend class Region; @@ -1401,7 +1368,7 @@ class Graphics : public GdiplusBase Status SetClip(const Graphics *g, CombineMode combineMode = CombineModeReplace) { - return SetStatus(DllExports::GdipSetClipGraphics(nativeGraphics, g ? g->nativeGraphics : NULL, combineMode)); + return SetStatus(DllExports::GdipSetClipGraphics(nativeGraphics, g ? getNat(g) : NULL, combineMode)); } Status @@ -1553,9 +1520,9 @@ class Graphics : public GdiplusBase // get native friend inline GpGraphics *& - getNat(const Graphics *graph) + getNat(const Graphics *graphics) { - return const_cast<Graphics *>(graph)->nativeGraphics; + return const_cast<Graphics *>(graphics)->nativeGraphics; } }; diff --git a/sdk/include/psdk/gdiplusheaders.h b/sdk/include/psdk/gdiplusheaders.h index 2cd2a35657f..d839ce324ff 100644 --- a/sdk/include/psdk/gdiplusheaders.h +++ b/sdk/include/psdk/gdiplusheaders.h @@ -310,7 +310,7 @@ class Image : public GdiplusBase if (!newImage) return SetStatus(InvalidParameter); - return SetStatus(DllExports::GdipSaveAddImage(nativeImage, newImage->nativeImage, encoderParams)); + return SetStatus(DllExports::GdipSaveAddImage(nativeImage, getNat(newImage), encoderParams)); #endif } @@ -386,10 +386,6 @@ class Image : public GdiplusBase } }; -// get native -GpGraphics *& -getNat(const Graphics *graph); - class Bitmap : public Image { friend class CachedBitmap; @@ -714,6 +710,13 @@ class FontCollection : public GdiplusBase FontCollection(const FontCollection &); FontCollection & operator=(const FontCollection &); + + // get native + friend inline GpFontCollection *& + getNat(const FontCollection *fc) + { + return const_cast<FontCollection *>(fc)->nativeFontCollection; + } }; class FontFamily : public GdiplusBase @@ -727,7 +730,7 @@ class FontFamily : public GdiplusBase FontFamily(const WCHAR *name, const FontCollection *fontCollection) { - GpFontCollection *theCollection = fontCollection ? fontCollection->nativeFontCollection : NULL; + GpFontCollection *theCollection = fontCollection ? getNat(fontCollection) : NULL; status = DllExports::GdipCreateFontFamilyFromName(name, theCollection, &fontFamily); } @@ -834,6 +837,13 @@ class FontFamily : public GdiplusBase this->status = status; return status; } + + // get native + friend inline GpFontFamily *& + getNat(const FontFamily *ff) + { + return const_cast<FontFamily *>(ff)->fontFamily; + } }; class InstalledFontFamily : public FontFamily @@ -1001,6 +1011,13 @@ class Font : public GdiplusBase this->status = status; return status; } + + // get native + friend inline GpFont *& + getNat(const Font *font) + { + return const_cast<Font *>(font)->font; + } }; class Region : public GdiplusBase @@ -1027,7 +1044,7 @@ class Region : public GdiplusBase Region(const GraphicsPath *path) { - lastStatus = DllExports::GdipCreateRegionPath(path->nativePath, &nativeRegion); + lastStatus = DllExports::GdipCreateRegionPath(getNat(path), &nativeRegion); } Region(HRGN hRgn) @@ -1052,7 +1069,7 @@ class Region : public GdiplusBase Status Complement(const GraphicsPath *path) { - GpPath *thePath = path ? path->nativePath : NULL; + GpPath *thePath = path ? getNat(path) : NULL; return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, thePath, CombineModeComplement)); } @@ -1088,7 +1105,7 @@ class Region : public GdiplusBase Exclude(const GraphicsPath *path) { return SetStatus( - DllExports::GdipCombineRegionPath(nativeRegion, path ? path->nativePath : NULL, CombineModeExclude)); + DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeExclude)); } Status @@ -1159,22 +1176,20 @@ class Region : public GdiplusBase Status GetRegionScans(const Matrix *matrix, Rect *rects, INT *count) const { - return SetStatus( - DllExports::GdipGetRegionScansI(nativeRegion, rects, count, matrix ? matrix->nativeMatrix : NULL)); + return SetStatus(DllExports::GdipGetRegionScansI(nativeRegion, rects, count, matrix ? getNat(matrix) : NULL)); } Status GetRegionScans(const Matrix *matrix, RectF *rects, INT *count) const { - return SetStatus( - DllExports::GdipGetRegionScans(nativeRegion, rects, count, matrix ? matrix->nativeMatrix : NULL)); + return SetStatus(DllExports::GdipGetRegionScans(nativeRegion, rects, count, matrix ? getNat(matrix) : NULL)); } UINT GetRegionScansCount(const Matrix *matrix) const { UINT count; - SetStatus(DllExports::GdipGetRegionScansCount(nativeRegion, &count, matrix ? matrix->nativeMatrix : NULL)); + SetStatus(DllExports::GdipGetRegionScansCount(nativeRegion, &count, matrix ? getNat(matrix) : NULL)); return count; } @@ -1187,7 +1202,7 @@ class Region : public GdiplusBase Status Intersect(const GraphicsPath *path) { - GpPath *thePath = path ? path->nativePath : NULL; + GpPath *thePath = path ? getNat(path) : NULL; return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, thePath, CombineModeIntersect)); } @@ -1303,7 +1318,7 @@ class Region : public GdiplusBase Status Transform(const Matrix *matrix) { - return SetStatus(DllExports::GdipTransformRegion(nativeRegion, matrix ? matrix->nativeMatrix : NULL)); + return SetStatus(DllExports::GdipTransformRegion(nativeRegion, matrix ? getNat(matrix) : NULL)); } Status @@ -1340,15 +1355,13 @@ class Region : public GdiplusBase Status Union(const GraphicsPath *path) { - return SetStatus( - DllExports::GdipCombineRegionPath(nativeRegion, path ? path->nativePath : NULL, CombineModeUnion)); + return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeUnion)); } Status Xor(const GraphicsPath *path) { - return SetStatus( - DllExports::GdipCombineRegionPath(nativeRegion, path ? path->nativePath : NULL, CombineModeXor)); + return SetStatus(DllExports::GdipCombineRegionPath(nativeRegion, path ? getNat(path) : NULL, CombineModeXor)); } Status diff --git a/sdk/include/psdk/gdipluslinecaps.h b/sdk/include/psdk/gdipluslinecaps.h index 0a0d26bada7..d449874b5e7 100644 --- a/sdk/include/psdk/gdipluslinecaps.h +++ b/sdk/include/psdk/gdipluslinecaps.h @@ -27,8 +27,8 @@ inline CustomLineCap::CustomLineCap( : nativeCap(NULL) { nativeCap = NULL; - GpPath *nativeFillPath = fillPath ? fillPath->nativePath : NULL; - GpPath *nativeStrokePath = strokePath ? strokePath->nativePath : NULL; + GpPath *nativeFillPath = fillPath ? getNat(fillPath) : NULL; + GpPath *nativeStrokePath = strokePath ? getNat(strokePath) : NULL; lastStatus = DllExports::GdipCreateCustomLineCap(nativeFillPath, nativeStrokePath, baseCap, baseInset, &nativeCap); } diff --git a/sdk/include/psdk/gdiplusmatrix.h b/sdk/include/psdk/gdiplusmatrix.h index c822be2cd4d..124b070a9e4 100644 --- a/sdk/include/psdk/gdiplusmatrix.h +++ b/sdk/include/psdk/gdiplusmatrix.h @@ -70,7 +70,7 @@ class Matrix : public GdiplusBase Equals(const Matrix *matrix) { BOOL result; - SetStatus(DllExports::GdipIsMatrixEqual(nativeMatrix, matrix ? matrix->nativeMatrix : NULL, &result)); + SetStatus(DllExports::GdipIsMatrixEqual(nativeMatrix, matrix ? getNat(matrix) : NULL, &result)); return result; } @@ -111,7 +111,7 @@ class Matrix : public GdiplusBase Status Multiply(const Matrix *matrix, MatrixOrder order) { - return SetStatus(DllExports::GdipMultiplyMatrix(nativeMatrix, matrix ? matrix->nativeMatrix : NULL, order)); + return SetStatus(DllExports::GdipMultiplyMatrix(nativeMatrix, matrix ? getNat(matrix) : NULL, order)); } REAL OffsetX(VOID) diff --git a/sdk/include/psdk/gdipluspath.h b/sdk/include/psdk/gdipluspath.h index a937784628c..2d2b3f3f2af 100644 --- a/sdk/include/psdk/gdipluspath.h +++ b/sdk/include/psdk/gdipluspath.h @@ -19,9 +19,6 @@ #ifndef _GDIPLUSPATH_H #define _GDIPLUSPATH_H -class FontFamily; -class Graphics; - class GraphicsPath : public GdiplusBase { friend class Region; @@ -233,10 +230,7 @@ class GraphicsPath : public GdiplusBase Status AddPath(const GraphicsPath *addingPath, BOOL connect) { - GpPath *nativePath2 = NULL; - if (addingPath) - nativePath2 = addingPath->nativePath; - + GpPath *nativePath2 = addingPath ? getNat(addingPath) : NULL; return SetStatus(DllExports::GdipAddPathPath(nativePath, nativePath2, connect)); } @@ -383,10 +377,7 @@ class GraphicsPath : public GdiplusBase Status Flatten(const Matrix *matrix, REAL flatness) { - GpMatrix *nativeMatrix = NULL; - if (matrix) - nativeMatrix = matrix->nativeMatrix; - + GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; return SetStatus(DllExports::GdipFlattenPath(nativePath, nativeMatrix, flatness)); } @@ -553,10 +544,7 @@ class GraphicsPath : public GdiplusBase WarpMode warpMode, REAL flatness) { - GpMatrix *nativeMatrix = NULL; - if (matrix) - nativeMatrix = matrix->nativeMatrix; - + GpMatrix *nativeMatrix = matrix ? getNat(matrix) : NULL; return SetStatus(DllExports::GdipWarpPath( nativePath, nativeMatrix, destPoints, count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, flatness)); diff --git a/sdk/include/psdk/gdipluspen.h b/sdk/include/psdk/gdipluspen.h index 76291aea017..58c08a4ed98 100644 --- a/sdk/include/psdk/gdipluspen.h +++ b/sdk/include/psdk/gdipluspen.h @@ -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)); }
4 years, 11 months
1
0
0
0
← Newer
1
...
11
12
13
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200