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

ToPaintY() public method

Convert a position relative to the box for which this is the transform to one in paint coordinates. Todo: tests and implementation of differing DPI and non-zero ScrollOffset.
public ToPaintY ( int ys ) : int
ys int
return int
		public int ToPaintY(int ys)
		{
			return ys + YOffset - YOffsetScroll;
		}

Usage Example

Example #1
0
        /// <summary>
        /// Answer true if the box is entirely below the clip rectangle.
        /// Enhance JohnT: Could refine this to skip a box if only its margin is visible.
        /// Enhance JohnT: if we do separate page drawing, as in print preview, we may need
        /// a more precise way to eliminate boxes not on the page.
        /// Enhance JohnT: may need to include a box that is just out of sight, in case exceptionally
        /// high stacked diacritics extend above the top of the box?
        /// </summary>
        internal override bool IsAfterVisibleBoxes(Box box, IVwGraphics vg, PaintTransform ptrans)
        {
            int left, top, right, bottom;

            vg.GetClipRect(out left, out top, out right, out bottom);
            return(ptrans.ToPaintY(box.Top) > bottom);
        }
All Usage Examples Of SIL.FieldWorks.SharpViews.PaintTransform::ToPaintY