C# 클래스 SFML.Graphics.Shape

Base class for textured shapes with outline
상속: Transformable, Drawable
파일 보기 프로젝트 열기: SFML/SFML.Net 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( RenderTarget target, RenderStates states ) : void

Draw the shape to a render target

GetGlobalBounds ( ) : FloatRect

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.

GetLocalBounds ( ) : FloatRect

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.

GetPoint ( uint index ) : Vector2f

Get the position of a point The returned point is in local coordinates, that is, the shape's transforms (position, rotation, scale) are not taken into account. The result is undefined if index is out of the valid range.

GetPointCount ( ) : uint

Get the total number of points of the shape

Shape ( Shape copy ) : System

Construct the shape from another shape

보호된 메소드들

메소드 설명
Destroy ( bool disposing ) : void

Handle the destruction of the object

Shape ( ) : System

Default constructor

Update ( ) : void

Recompute the internal geometry of the shape. This function must be called by the derived class everytime the shape's points change (ie. the result of either PointCount or GetPoint is different).

비공개 메소드들

메소드 설명
InternalGetPoint ( uint index, IntPtr userData ) : Vector2f

Callback passed to the C API

InternalGetPointCount ( IntPtr userData ) : uint

Callback passed to the C API

sfRenderTexture_drawShape ( IntPtr CPointer, IntPtr Shape, RenderStates &states ) : void
sfRenderWindow_drawShape ( IntPtr CPointer, IntPtr Shape, RenderStates &states ) : void
sfShape_copy ( IntPtr Shape ) : IntPtr
sfShape_create ( GetPointCountCallbackType getPointCount, GetPointCallbackType getPoint, IntPtr userData ) : IntPtr
sfShape_destroy ( IntPtr CPointer ) : void
sfShape_getFillColor ( IntPtr CPointer ) : System.Color
sfShape_getLocalBounds ( IntPtr CPointer ) : FloatRect
sfShape_getOutlineColor ( IntPtr CPointer ) : System.Color
sfShape_getOutlineThickness ( IntPtr CPointer ) : float
sfShape_getTextureRect ( IntPtr CPointer ) : IntRect
sfShape_setFillColor ( IntPtr CPointer, System.Color Color ) : void
sfShape_setOutlineColor ( IntPtr CPointer, System.Color Color ) : void
sfShape_setOutlineThickness ( IntPtr CPointer, float Thickness ) : void
sfShape_setTexture ( IntPtr CPointer, IntPtr Texture, bool AdjustToNewSize ) : void
sfShape_setTextureRect ( IntPtr CPointer, IntRect Rect ) : void
sfShape_update ( IntPtr CPointer ) : void

메소드 상세

Destroy() 보호된 메소드

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
리턴 void

Draw() 공개 메소드

Draw the shape to a render target
public Draw ( RenderTarget target, RenderStates states ) : void
target RenderTarget Render target to draw to
states RenderStates Current render states
리턴 void

GetGlobalBounds() 공개 메소드

Get the global bounding rectangle of the entity. The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.
public GetGlobalBounds ( ) : FloatRect
리턴 FloatRect

GetLocalBounds() 공개 메소드

Get the local bounding rectangle of the entity. The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
public GetLocalBounds ( ) : FloatRect
리턴 FloatRect

GetPoint() 공개 추상적인 메소드

Get the position of a point The returned point is in local coordinates, that is, the shape's transforms (position, rotation, scale) are not taken into account. The result is undefined if index is out of the valid range.
public abstract GetPoint ( uint index ) : Vector2f
index uint Index of the point to get, in range [0 .. PointCount - 1]
리턴 Vector2f

GetPointCount() 공개 추상적인 메소드

Get the total number of points of the shape
public abstract GetPointCount ( ) : uint
리턴 uint

Shape() 보호된 메소드

Default constructor
protected Shape ( ) : System
리턴 System

Shape() 공개 메소드

Construct the shape from another shape
public Shape ( Shape copy ) : System
copy Shape Shape to copy
리턴 System

Update() 보호된 메소드

Recompute the internal geometry of the shape. This function must be called by the derived class everytime the shape's points change (ie. the result of either PointCount or GetPoint is different).
protected Update ( ) : void
리턴 void