gdiplus: Added GdipSetWorldTransform/GdipGetWorldTransform.
This commit is contained in:
parent
eab427ee3f
commit
f30732fdf9
|
@ -386,7 +386,7 @@
|
||||||
@ stub GdipGetTextureWrapMode
|
@ stub GdipGetTextureWrapMode
|
||||||
@ stub GdipGetVisibleClipBounds
|
@ stub GdipGetVisibleClipBounds
|
||||||
@ stub GdipGetVisibleClipBoundsI
|
@ stub GdipGetVisibleClipBoundsI
|
||||||
@ stub GdipGetWorldTransform
|
@ stdcall GdipGetWorldTransform(ptr ptr)
|
||||||
@ stub GdipGraphicsClear
|
@ stub GdipGraphicsClear
|
||||||
@ stub GdipImageForceValidation
|
@ stub GdipImageForceValidation
|
||||||
@ stub GdipImageGetFrameCount
|
@ stub GdipImageGetFrameCount
|
||||||
|
@ -576,7 +576,7 @@
|
||||||
@ stub GdipSetTextRenderingHint
|
@ stub GdipSetTextRenderingHint
|
||||||
@ stub GdipSetTextureTransform
|
@ stub GdipSetTextureTransform
|
||||||
@ stub GdipSetTextureWrapMode
|
@ stub GdipSetTextureWrapMode
|
||||||
@ stub GdipSetWorldTransform
|
@ stdcall GdipSetWorldTransform(ptr ptr)
|
||||||
@ stub GdipShearMatrix
|
@ stub GdipShearMatrix
|
||||||
@ stdcall GdipStartPathFigure(ptr)
|
@ stdcall GdipStartPathFigure(ptr)
|
||||||
@ stub GdipStringFormatGetGenericDefault
|
@ stub GdipStringFormatGetGenericDefault
|
||||||
|
|
|
@ -67,6 +67,7 @@ struct GpGraphics{
|
||||||
PixelOffsetMode pixeloffset;
|
PixelOffsetMode pixeloffset;
|
||||||
GpUnit unit; /* page unit */
|
GpUnit unit; /* page unit */
|
||||||
REAL scale; /* page scale */
|
REAL scale; /* page scale */
|
||||||
|
GpMatrix * worldtrans; /* world transform */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GpBrush{
|
struct GpBrush{
|
||||||
|
|
|
@ -734,6 +734,8 @@ end:
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
||||||
{
|
{
|
||||||
|
GpStatus retval;
|
||||||
|
|
||||||
if(hdc == NULL)
|
if(hdc == NULL)
|
||||||
return OutOfMemory;
|
return OutOfMemory;
|
||||||
|
|
||||||
|
@ -743,6 +745,11 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
|
||||||
*graphics = GdipAlloc(sizeof(GpGraphics));
|
*graphics = GdipAlloc(sizeof(GpGraphics));
|
||||||
if(!*graphics) return OutOfMemory;
|
if(!*graphics) return OutOfMemory;
|
||||||
|
|
||||||
|
if((retval = GdipCreateMatrix(&(*graphics)->worldtrans)) != Ok){
|
||||||
|
GdipFree(*graphics);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
(*graphics)->hdc = hdc;
|
(*graphics)->hdc = hdc;
|
||||||
(*graphics)->hwnd = NULL;
|
(*graphics)->hwnd = NULL;
|
||||||
(*graphics)->smoothing = SmoothingModeDefault;
|
(*graphics)->smoothing = SmoothingModeDefault;
|
||||||
|
@ -773,6 +780,7 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
|
||||||
if(graphics->hwnd)
|
if(graphics->hwnd)
|
||||||
ReleaseDC(graphics->hwnd, graphics->hdc);
|
ReleaseDC(graphics->hwnd, graphics->hdc);
|
||||||
|
|
||||||
|
GdipDeleteMatrix(graphics->worldtrans);
|
||||||
HeapFree(GetProcessHeap(), 0, graphics);
|
HeapFree(GetProcessHeap(), 0, graphics);
|
||||||
|
|
||||||
return Ok;
|
return Ok;
|
||||||
|
@ -1133,6 +1141,15 @@ GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics *graphics, SmoothingMode *mo
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
|
||||||
|
{
|
||||||
|
if(!graphics || !matrix)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
memcpy(matrix, graphics->worldtrans, sizeof(GpMatrix));
|
||||||
|
return Ok;
|
||||||
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state)
|
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state)
|
||||||
{
|
{
|
||||||
if(!graphics)
|
if(!graphics)
|
||||||
|
@ -1215,3 +1232,12 @@ GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mod
|
||||||
|
|
||||||
return Ok;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
|
||||||
|
{
|
||||||
|
if(!graphics || !matrix)
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
GdipDeleteMatrix(graphics->worldtrans);
|
||||||
|
return GdipCloneMatrix(matrix, &graphics->worldtrans);
|
||||||
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*);
|
||||||
GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*);
|
GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*);
|
||||||
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*);
|
GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*);
|
||||||
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
|
GpStatus WINGDIPAPI GdipGetSmoothingMode(GpGraphics*,SmoothingMode*);
|
||||||
|
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics*,GpMatrix*);
|
||||||
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState);
|
GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState);
|
||||||
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*);
|
GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*);
|
||||||
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
|
GpStatus WINGDIPAPI GdipSetCompositingQuality(GpGraphics*,CompositingQuality);
|
||||||
|
@ -74,6 +75,7 @@ GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics*,REAL);
|
||||||
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics*,GpUnit);
|
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics*,GpUnit);
|
||||||
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode);
|
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics*,PixelOffsetMode);
|
||||||
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
|
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics*,SmoothingMode);
|
||||||
|
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*);
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
|
GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**);
|
||||||
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
|
||||||
|
|
Loading…
Reference in New Issue