mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Add GDI+ specific temporary solution for transformations
This commit is contained in:
@ -57,6 +57,12 @@ public:
|
||||
|
||||
virtual bool IsTransparentPixel(int x, int y) = 0;
|
||||
|
||||
// TODO: Implement proper solution.
|
||||
virtual void SetTransform(const Gdiplus::Matrix& matrix) {}
|
||||
virtual void ResetTransform() {}
|
||||
virtual void RotateTransform(float angle) {}
|
||||
virtual void TranslateTransform(float dx, float dy) {}
|
||||
|
||||
virtual void SetAntiAliasing(bool enable) = 0;
|
||||
virtual void SetTextAntiAliasing(bool enable) = 0;
|
||||
|
||||
|
@ -128,6 +128,26 @@ bool CanvasGDIP::IsTransparentPixel(int x, int y)
|
||||
return false;
|
||||
}
|
||||
|
||||
void CanvasGDIP::SetTransform(const Gdiplus::Matrix& matrix)
|
||||
{
|
||||
m_Graphics->SetTransform(&matrix);
|
||||
}
|
||||
|
||||
void CanvasGDIP::ResetTransform()
|
||||
{
|
||||
m_Graphics->ResetTransform();
|
||||
}
|
||||
|
||||
void CanvasGDIP::RotateTransform(float angle)
|
||||
{
|
||||
m_Graphics->RotateTransform(angle);
|
||||
}
|
||||
|
||||
void CanvasGDIP::TranslateTransform(float dx, float dy)
|
||||
{
|
||||
m_Graphics->TranslateTransform(dx, dy);
|
||||
}
|
||||
|
||||
void CanvasGDIP::SetAntiAliasing(bool enable)
|
||||
{
|
||||
m_Graphics->SetSmoothingMode(
|
||||
|
@ -48,6 +48,11 @@ public:
|
||||
|
||||
virtual bool IsTransparentPixel(int x, int y) override;
|
||||
|
||||
virtual void SetTransform(const Gdiplus::Matrix& matrix) override;
|
||||
virtual void ResetTransform() override;
|
||||
virtual void RotateTransform(float angle) override;
|
||||
virtual void TranslateTransform(float dx, float dy) override;
|
||||
|
||||
virtual void SetAntiAliasing(bool enable) override;
|
||||
virtual void SetTextAntiAliasing(bool enable) override;
|
||||
|
||||
|
Reference in New Issue
Block a user