C# 클래스 SIL.FieldWorks.SharpViews.PaintTransform

A PaintTransform is used when actually painting boxes, or performing similar opertions like hit testing that depend on actual drawing coordinates. The first four constructor arguments are the same as for the base class, and should be the same as the most recent layout operation performed on the box to which the transform is passed. See LayoutTransform for doc. The next four arguments give the resolution at which drawing is actually done, and, in paint pixels, another offset. Typically this offset represents the amount by which the view is scrolled. Conceptually they are the distance that the top left of the view is above and left of the top left of the area in which it is drawn. This means that, after a position relative to the top left of the view is computed as the place to draw something, to convert to paint coordinates we multiply by the ratio of dpiXPaint/dpiXLayout, then subtract dxScroll...and similarly for Y.
상속: LayoutTransform
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ConvertToPaint Point
ConvertToPaint Rect
FromSourceAndDest PaintTransform
ToPaint Rect

공개 메소드들

메소드 설명
PaintTransform ( int dxLayout, int dyLayout, int dpiXLayout, int dpiYLayout, int dxScroll, int dyScroll, int dpiXPaint, int dpiYPaint ) : System
PaintTransformOffsetBy ( int dx, int dy ) : PaintTransform

Answer a layout transform (actually a PaintTransform) suitable for a child box whose left and top are dx and dy.

ToLayout ( Point paintPoint ) : Point

Convert a point in paint coordinates to one relative to the box that uses this transformation.

ToLayoutX ( int x ) : int

Convert an X coordinate from paint to layout coords.

ToPaint ( Point layout ) : Point

Convert a complete point to Painting coordinates (not yet tested)

ToPaint ( Rectangle rLayout ) : Rectangle

Convert a rectangle 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.

ToPaintX ( int xs ) : int

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.

ToPaintY ( int ys ) : int

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.

비공개 메소드들

메소드 설명
ConvertToPaint ( Point source, Rect srcRect, Rect dstRect ) : Point

Currently not used: given a point in destination coordinates and two rectangles such as are returned by SourceRect and DestRect, generate the point (ToPaintX(source.X), ToPaintY(source.Y)) that would be returned by a transformation represented by that transformation. (not yet used or tested)

ConvertToPaint ( Rect source, Rect srcRect, Rect dstRect ) : Rect

Currently only used in testing: given a point in destination coordinates and two rectangles such as are returned by SourceRect and DestRect, generate the point (ToPaintX(source.X), ToPaintY(source.Y)) that would be returned by a transformation represented by that transformation. (not yet used or tested)

FromSourceAndDest ( Rect srcRect, Rect dstRect ) : PaintTransform

Return the PaintTransform that would produce the indicated Source and Dest Rects.

ToPaint ( Rect rLayout ) : Rect

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.

메소드 상세

PaintTransform() 공개 메소드

public PaintTransform ( int dxLayout, int dyLayout, int dpiXLayout, int dpiYLayout, int dxScroll, int dyScroll, int dpiXPaint, int dpiYPaint ) : System
dxLayout int
dyLayout int
dpiXLayout int
dpiYLayout int
dxScroll int
dyScroll int
dpiXPaint int
dpiYPaint int
리턴 System

PaintTransformOffsetBy() 공개 메소드

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
리턴 PaintTransform

ToLayout() 공개 메소드

Convert a point in paint coordinates to one relative to the box that uses this transformation.
public ToLayout ( Point paintPoint ) : Point
paintPoint Point
리턴 Point

ToLayoutX() 공개 메소드

Convert an X coordinate from paint to layout coords.
public ToLayoutX ( int x ) : int
x int
리턴 int

ToPaint() 공개 메소드

Convert a complete point to Painting coordinates (not yet tested)
public ToPaint ( Point layout ) : Point
layout Point
리턴 Point

ToPaint() 공개 메소드

Convert a rectangle 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.
public ToPaint ( Rectangle rLayout ) : Rectangle
rLayout System.Drawing.Rectangle
리턴 System.Drawing.Rectangle

ToPaintX() 공개 메소드

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 ToPaintX ( int xs ) : int
xs int
리턴 int

ToPaintY() 공개 메소드

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
리턴 int