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

PaintTransformOffsetBy() public method

Answer a layout transform (actually a PaintTransform) suitable for a child box whose left and top are dx and dy.
public PaintTransformOffsetBy ( int dx, int dy ) : PaintTransform
dx int
dy int
return PaintTransform
		public virtual PaintTransform PaintTransformOffsetBy(int dx, int dy)
		{
			return new PaintTransform(XOffset + dx, YOffset + dy, DpiX, DpiY, XOffsetScroll, YOffsetScroll, DpiXPaint, DpiYPaint);
		}

Usage Example

Example #1
0
        public override void PaintBackground(IVwGraphics vg, PaintTransform ptrans)
        {
            base.PaintBackground(vg, ptrans);
            PaintTransform childTrans = ptrans.PaintTransformOffsetBy(Left, Top);

            for (Box box = FirstVisibleBox(vg, ptrans); box != null && !IsAfterVisibleBoxes(box, vg, ptrans); box = box.Next)
            {
                box.PaintBackground(vg, childTrans);
            }
        }
All Usage Examples Of SIL.FieldWorks.SharpViews.PaintTransform::PaintTransformOffsetBy