mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Tweaks
This commit is contained in:
parent
12bd890aef
commit
53c6966819
@ -244,20 +244,13 @@ bool CanvasD2D::IsTransparentPixel(int x, int y)
|
||||
return transparent;
|
||||
}
|
||||
|
||||
D2D1::Matrix3x2F CanvasD2D::GetCurrentTransform()
|
||||
D2D1_MATRIX_3X2_F CanvasD2D::GetCurrentTransform()
|
||||
{
|
||||
D2D1::Matrix3x2F dMatrix = D2D1::Matrix3x2F::Identity();
|
||||
Gdiplus::Matrix gMatrix;
|
||||
|
||||
if (Gdiplus::Ok == m_GdipGraphics->GetTransform(&gMatrix))
|
||||
{
|
||||
float m[6];
|
||||
gMatrix.GetElements(m);
|
||||
|
||||
dMatrix = D2D1::Matrix3x2F(m[0], m[1], m[2], m[3], m[4], m[5]);
|
||||
}
|
||||
|
||||
return dMatrix;
|
||||
D2D1_MATRIX_3X2_F d2dMatrix;
|
||||
Gdiplus::Matrix gdipMatrix;
|
||||
m_GdipGraphics->GetTransform(&gdipMatrix);
|
||||
gdipMatrix.GetElements((Gdiplus::REAL*)&d2dMatrix);
|
||||
return d2dMatrix;
|
||||
}
|
||||
|
||||
void CanvasD2D::SetTransform(const Gdiplus::Matrix& matrix)
|
||||
|
@ -84,7 +84,7 @@ private:
|
||||
void EndTargetDraw();
|
||||
|
||||
// Retrieves current GDI+ transform (if any) and converts to a D2D Matrix
|
||||
D2D1::Matrix3x2F GetCurrentTransform();
|
||||
D2D1_MATRIX_3X2_F GetCurrentTransform();
|
||||
|
||||
ID2D1RenderTarget* m_Target;
|
||||
WICBitmapDIB m_Bitmap;
|
||||
|
Loading…
Reference in New Issue
Block a user