C# 클래스 System.Drawing.Dimension

The Dimension class encapsulates the width and height of a component (in int precision) in a single object.
The class is associated with certain properties of components. Several methods defined by the Component class and the LayoutManager interface return a Dimension object.

Normally the values of width and height are non-negative ints. The constructors that allow you to create a dimension do not prevent you from setting a negative value for these properties. If the value of width or height is negative, the behavior of some methods defined by other objects is undefined.

상속: System.Drawing.Dimension2D
파일 보기 프로젝트 열기: red-gate/iTextSharp-4.1.6 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
height int
width int

공개 메소드들

메소드 설명
Dimension ( ) : System

Creates an instance of Dimension with a width of zero and a height of zero.

Dimension ( Dimension d ) : System

Creates an instance of Dimension whose width and height are the same as for the specified dimension.

Dimension ( int width, int height ) : System

Constructs a Dimension and initializes it to the specified width and specified height.

Equals ( Object obj ) : bool

Checks whether two dimension objects have equal values.

GetHashCode ( ) : int

Returns the hash code for this Dimension.

SetSize ( double width, double height ) : void

Set the size of this Dimension object to the specified width and height in double precision.

SetSize ( int width, int height ) : void

Set the size of this Dimension object to the specified width and height.

ToString ( ) : string

Returns a string representation of the values of this Dimension object's height and width fields.

This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

메소드 상세

Dimension() 공개 메소드

Creates an instance of Dimension with a width of zero and a height of zero.
public Dimension ( ) : System
리턴 System

Dimension() 공개 메소드

Creates an instance of Dimension whose width and height are the same as for the specified dimension.
public Dimension ( Dimension d ) : System
d Dimension /// the specified dimension for the /// width and /// height values. ///
리턴 System

Dimension() 공개 메소드

Constructs a Dimension and initializes it to the specified width and specified height.
public Dimension ( int width, int height ) : System
width int the specified width dimension
height int the specified height dimension
리턴 System

Equals() 공개 메소드

Checks whether two dimension objects have equal values.
public Equals ( Object obj ) : bool
obj Object
리턴 bool

GetHashCode() 공개 메소드

Returns the hash code for this Dimension.
public GetHashCode ( ) : int
리턴 int

SetSize() 공개 메소드

Set the size of this Dimension object to the specified width and height in double precision.
public SetSize ( double width, double height ) : void
width double the new width for the Dimension object
height double the new height for the Dimension object
리턴 void

SetSize() 공개 메소드

Set the size of this Dimension object to the specified width and height.
public SetSize ( int width, int height ) : void
width int the new width for this Dimension object.
height int the new height for this Dimension object.
리턴 void

ToString() 공개 메소드

Returns a string representation of the values of this Dimension object's height and width fields.
This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
public ToString ( ) : string
리턴 string

프로퍼티 상세

height 공개적으로 프로퍼티

The height dimension. Negative values can be used.
public int height
리턴 int

width 공개적으로 프로퍼티

The width dimension. Negative values can be used.
public int width
리턴 int