SIL.FieldWorks.SharpViews.PaintTransform.ToPaint C# (CSharp) Method

ToPaint() private method

Convert a rect relative to the box for which this transform is configured to one in paint coordinates. Todo: tests and implementation of differing DPI and non-zero ScrollOffset. Currently only used in making test data.
private ToPaint ( Rect rLayout ) : Rect
rLayout Rect
return Rect
		internal Rect ToPaint(Rect rLayout)
		{
			return new Rect(ToPaintX(rLayout.left), ToPaintY(rLayout.top),
				ToPaintX(rLayout.right), ToPaintY(rLayout.bottom));
		}

Same methods

PaintTransform::ToPaint ( Point layout ) : Point
PaintTransform::ToPaint ( Rectangle rLayout ) : Rectangle

Usage Example

Example #1
0
		public override void PaintBackground(Common.COMInterfaces.IVwGraphics vg, PaintTransform ptrans)
		{
			base.PaintBackground(vg, ptrans); // might paint some pad or border around the block.
			Rectangle paintRect = ptrans.ToPaint(new Rectangle(Left + GapLeading(ptrans), Top + GapTop(ptrans),
				ptrans.MpToPixelsX(MpWidth), ptrans.MpToPixelsY(MpHeight)));
			vg.BackColor = (int) ColorUtil.ConvertColorToBGR(BlockColor);
			vg.DrawRectangle(paintRect.Left, paintRect.Top, paintRect.Right, paintRect.Bottom);
		}
All Usage Examples Of SIL.FieldWorks.SharpViews.PaintTransform::ToPaint