From 1ac791287437c3fb9be3ca850d7aa370ba6b55ec Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 31 Jul 2008 09:08:32 +0400 Subject: [PATCH] gdiplus: Implemented Gdip[Get/Set]PenMode. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/pen.c | 15 ++++++++++++--- include/gdiplusflat.h | 2 ++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 661cb8fdd48..48d46a3992d 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -363,7 +363,7 @@ @ stub GdipGetPenFillType @ stdcall GdipGetPenLineJoin(ptr ptr) @ stdcall GdipGetPenMiterLimit(ptr ptr) -@ stub GdipGetPenMode +@ stdcall GdipGetPenMode(ptr ptr) @ stdcall GdipGetPenStartCap(ptr ptr) @ stub GdipGetPenTransform @ stdcall GdipGetPenUnit(ptr ptr) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index b445a584ad5..8fe8862e50d 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -72,6 +72,7 @@ struct GpPen{ INT numdashes; REAL offset; /* dash offset */ GpBrush *brush; + GpPenAlignment align; }; struct GpGraphics{ diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index df2d040caa3..829b1915620 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -237,6 +237,16 @@ GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin) return Ok; } +GpStatus WINGDIPAPI GdipGetPenMode(GpPen *pen, GpPenAlignment *mode) +{ + if(!pen || !mode) + return InvalidParameter; + + *mode = pen->align; + + return Ok; +} + GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit) { if(!pen || !miterLimit) @@ -481,12 +491,11 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width) return Ok; } - -GpStatus WINGDIPAPI GdipSetPenMode(GpPen *pen, GpPenAlignment penAlignment) +GpStatus WINGDIPAPI GdipSetPenMode(GpPen *pen, GpPenAlignment mode) { if(!pen) return InvalidParameter; - FIXME("stub (%d)\n", penAlignment); + pen->align = mode; return Ok; } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index f5705a7ad1d..2e0d743b1f3 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -37,6 +37,7 @@ GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen*,REAL*,INT); GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen*,INT*); GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*); GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*); +GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*); GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*); GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB); GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*); @@ -48,6 +49,7 @@ GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle); GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap); GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap); GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen*,GpLineJoin); +GpStatus WINGDIPAPI GdipSetPenMode(GpPen*,GpPenAlignment); GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen*,REAL); GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap); GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL);