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:
		@@ -244,20 +244,13 @@ bool CanvasD2D::IsTransparentPixel(int x, int y)
 | 
				
			|||||||
	return transparent;
 | 
						return transparent;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
D2D1::Matrix3x2F CanvasD2D::GetCurrentTransform()
 | 
					D2D1_MATRIX_3X2_F CanvasD2D::GetCurrentTransform()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	D2D1::Matrix3x2F dMatrix = D2D1::Matrix3x2F::Identity();
 | 
						D2D1_MATRIX_3X2_F d2dMatrix;
 | 
				
			||||||
	Gdiplus::Matrix gMatrix;
 | 
						Gdiplus::Matrix gdipMatrix;
 | 
				
			||||||
 | 
						m_GdipGraphics->GetTransform(&gdipMatrix);
 | 
				
			||||||
	if (Gdiplus::Ok == m_GdipGraphics->GetTransform(&gMatrix))
 | 
						gdipMatrix.GetElements((Gdiplus::REAL*)&d2dMatrix);
 | 
				
			||||||
	{
 | 
						return d2dMatrix;
 | 
				
			||||||
		float m[6];
 | 
					 | 
				
			||||||
		gMatrix.GetElements(m);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		dMatrix = D2D1::Matrix3x2F(m[0], m[1], m[2], m[3], m[4], m[5]);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return dMatrix;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CanvasD2D::SetTransform(const Gdiplus::Matrix& matrix)
 | 
					void CanvasD2D::SetTransform(const Gdiplus::Matrix& matrix)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,7 +84,7 @@ private:
 | 
				
			|||||||
	void EndTargetDraw();
 | 
						void EndTargetDraw();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Retrieves current GDI+ transform (if any) and converts to a D2D Matrix
 | 
						// Retrieves current GDI+ transform (if any) and converts to a D2D Matrix
 | 
				
			||||||
	D2D1::Matrix3x2F GetCurrentTransform();
 | 
						D2D1_MATRIX_3X2_F GetCurrentTransform();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ID2D1RenderTarget* m_Target;
 | 
						ID2D1RenderTarget* m_Target;
 | 
				
			||||||
	WICBitmapDIB m_Bitmap;
 | 
						WICBitmapDIB m_Bitmap;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user