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

A LayoutTransform contains the information that a Box needs to transform points in its own coordinate system (or possibly its container's coordinate system) into points relative to the view as a whole. This class is immutable; if you need a different one, make a new one.
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
InitializeOnlyOffsetBy void
MulDiv int
MulDivNotToZero int

공개 메소드들

메소드 설명
LayoutTransform ( int dx, int dy, int dpiX, int dpiY ) : System

This constructor makes a transform suitable for a box whose top left is dx below and dy to the right of the top left of the whole view area, and which will be laid out as if for a device resolution of dpiX pixels per inch horizontally and dpiY vertically.

MpToBorderPixelsX ( int mp ) : int

Convert a border width in mp to pixels. Should not answer zero unless mp is zero.

MpToBorderPixelsY ( int mp ) : int

Convert a border height in mp to pixels. Should not answer zero unless mp is zero.

MpToPixelsX ( int mp ) : int

Transform a distance in millipoints (72,000 per inch) into pixels in the X direction.

MpToPixelsY ( int mp ) : int

Transform a distance in millipoints (72,000 per inch) into pixels in the X direction.

OffsetBy ( int dx, int dy ) : LayoutTransform

Answer a layout transform suitable for a child box whose left and top are dx and dy. (Keep InitializeOnlyOffsetBy consistent with this.)

ToRoot ( Point p ) : Point

Converts a Point in box coordinates to whole-view coordinates.

비공개 메소드들

메소드 설명
InitializeOnlyOffsetBy ( int dx, int dy ) : void

This method is internal only because I definitely don't want it as public as 'protected'. It should ONLY be used by subclass methods constructing copies offset by the specified amount.

MulDiv ( int mp, int dpi, int div ) : int

Multiply the first two arguments and divide by the third. Assume the result will not overflow, but the intermediate product may be larger than an int. Round to the closest integer result. Assumes div is not zero.

MulDivNotToZero ( int mp, int dpi, int div ) : int

Multiply the first two arguments and divide by the third. Assume the result will not overflow, but the intermediate product may be larger than an int. Round to the closest integer result, except that the result must not be zero unless the first argument is zero.

메소드 상세

LayoutTransform() 공개 메소드

This constructor makes a transform suitable for a box whose top left is dx below and dy to the right of the top left of the whole view area, and which will be laid out as if for a device resolution of dpiX pixels per inch horizontally and dpiY vertically.
public LayoutTransform ( int dx, int dy, int dpiX, int dpiY ) : System
dx int
dy int
dpiX int
dpiY int
리턴 System

MpToBorderPixelsX() 공개 메소드

Convert a border width in mp to pixels. Should not answer zero unless mp is zero.
public MpToBorderPixelsX ( int mp ) : int
mp int
리턴 int

MpToBorderPixelsY() 공개 메소드

Convert a border height in mp to pixels. Should not answer zero unless mp is zero.
public MpToBorderPixelsY ( int mp ) : int
mp int
리턴 int

MpToPixelsX() 공개 메소드

Transform a distance in millipoints (72,000 per inch) into pixels in the X direction.
public MpToPixelsX ( int mp ) : int
mp int
리턴 int

MpToPixelsY() 공개 메소드

Transform a distance in millipoints (72,000 per inch) into pixels in the X direction.
public MpToPixelsY ( int mp ) : int
mp int
리턴 int

OffsetBy() 공개 메소드

Answer a layout transform suitable for a child box whose left and top are dx and dy. (Keep InitializeOnlyOffsetBy consistent with this.)
public OffsetBy ( int dx, int dy ) : LayoutTransform
dx int
dy int
리턴 LayoutTransform

ToRoot() 공개 메소드

Converts a Point in box coordinates to whole-view coordinates.
public ToRoot ( Point p ) : Point
p Point
리턴 Point