C# 클래스 LitDev.LDGraphicsWindow

파일 보기 프로젝트 열기: litdev1/LitDev

공개 프로퍼티들

프로퍼티 타입 설명
_ClosingDelegate SmallBasicCallback

공개 메소드들

메소드 설명
BackgroundBrush ( Primitive brush ) : void

Set the background as a gradient of colours.

BackgroundImage ( Primitive imageName ) : void

Set the background as an image. The backgound is auto rescaled to fill whatever size the GraphicsWindow is.

Capture ( Primitive fileName, Primitive border ) : Primitive

Save the GraphicsWindow as an image file (png, jpg, bmp, gif, tiff or ico). The window must be visible and a short delay may be required after updating the window before calling.

ExitButtonMode ( Primitive window, Primitive mode ) : void

Set the mode of the close button for a window.

FloodFill ( Primitive x, Primitive y, Primitive colour ) : void

Fill a region surrounding a specified pixel. All neighbour pixels of the same colour are changed. This only applies to the drawing layer of the GraphicsWindow.

GetPixel ( Primitive x, Primitive y ) : Primitive

Gets the color of the pixel at the specified x and y co-ordinates. This method works for background, drawing and shape layers.

PauseUpdates ( ) : void

Pause GraphicsWindow Updates.

Print ( Primitive border ) : void

Print the GraphicsWindow contents. The window must be visible and a short delay may be required after updating the window before calling.

Reposition ( Primitive scaleX, Primitive scaleY, Primitive panX, Primitive panY, Primitive angle ) : void

Scale and move all Shapes and Contols within the GraphicsWindow. This method resizes and moves the view rather than the shapes, so their positions and other properties remain unchanged but appear scaled within the repositioned region. For example Shapes.GetLeft remains unchanged although the view has been repositioned and GraphicsWindow.MouseX reports the coordinates relative to the repositioned view. Imagine the entire view is repositioned as if it were a shape inside the GrapicsWindow. The transformation between view coordinates (vX,vY) and GraphicsWindow coordinates (gwX,gwY) is: gwX = (vX+panX)*scaleX + gw*(1-scaleX)/2 gwY = (vY+panY)*scaleY + gh*(1-scaleY)/2 All drawing remains within the original GraphicsWindow.

RepositionPoint ( Primitive x, Primitive y, Primitive toGW ) : Primitive

Get coordinates transformed between GraphicsWindow and a repositioned View (See Reposition).

ResumeUpdates ( ) : void

Resume GraphicsWindow Updates.

SetActive ( ) : void

Set the GraphicsWindow as active (has focus).

SetFontFromFile ( Primitive fontFile ) : Primitive

Set font in GraphicsWindow from a local TTF font file.

TransparentGW ( ) : void

Create a transparent GraphicsWindow. This must be the called before any other GraphicsWindow, Controls or Shapes methods that create a window. To see anything you must add something to the transparent GraphicsWindow. For example, create a non-rectangular window using a transparent border png with LDShapes.BackgroundImage. The transparency can be altered with GraphicsWindow.BackgroundColor. Sometimes less than 100% transparency can be required (e.g. to register mouse movements).

비공개 메소드들

메소드 설명
BackgroundBrushGradient ( Primitive brush ) : void
GetTransforms ( System.Windows.Controls.Canvas canvas ) : void
_ClosingEvent ( Object sender, CancelEventArgs e ) : void

메소드 상세

BackgroundBrush() 공개 정적인 메소드

Set the background as a gradient of colours.
public static BackgroundBrush ( Primitive brush ) : void
brush Primitive /// A previously created gradient or image brush (LDShapes.BrushGradient LDShapes.BrushImage). ///
리턴 void

BackgroundImage() 공개 정적인 메소드

Set the background as an image. The backgound is auto rescaled to fill whatever size the GraphicsWindow is.
public static BackgroundImage ( Primitive imageName ) : void
imageName Primitive /// The image to load as the background. /// Value returned from ImageList.LoadImage or local or network image file. ///
리턴 void

Capture() 공개 정적인 메소드

Save the GraphicsWindow as an image file (png, jpg, bmp, gif, tiff or ico). The window must be visible and a short delay may be required after updating the window before calling.
public static Capture ( Primitive fileName, Primitive border ) : Primitive
fileName Primitive /// The file to save the image to (*.png, *.jpg, *.bmp, *.gif, *.tiff or *.ico). /// If this is set to "", then the image is created internally as an ImageList. ///
border Primitive /// Include the window border ("True" or "False"). ///
리턴 Primitive

ExitButtonMode() 공개 정적인 메소드

Set the mode of the close button for a window.
public static ExitButtonMode ( Primitive window, Primitive mode ) : void
window Primitive The window title, e.g. TextWindow.Title or GraphicsWindow.Title.
mode Primitive The mode "Enabled", "Disabled")
리턴 void

FloodFill() 공개 정적인 메소드

Fill a region surrounding a specified pixel. All neighbour pixels of the same colour are changed. This only applies to the drawing layer of the GraphicsWindow.
public static FloodFill ( Primitive x, Primitive y, Primitive colour ) : void
x Primitive /// The x co-ordinate of the pixel to start the fill. ///
y Primitive /// The y co-ordinate of the pixel to start the fill. ///
colour Primitive /// The colour to fill with. ///
리턴 void

GetPixel() 공개 정적인 메소드

Gets the color of the pixel at the specified x and y co-ordinates. This method works for background, drawing and shape layers.
public static GetPixel ( Primitive x, Primitive y ) : Primitive
x Primitive /// The x co-ordinate of the pixel. ///
y Primitive /// The y co-ordinate of the pixel. ///
리턴 Primitive

PauseUpdates() 공개 정적인 메소드

Pause GraphicsWindow Updates.
public static PauseUpdates ( ) : void
리턴 void

Print() 공개 정적인 메소드

Print the GraphicsWindow contents. The window must be visible and a short delay may be required after updating the window before calling.
public static Print ( Primitive border ) : void
border Primitive /// Include the window border ("True" or "False"). ///
리턴 void

Reposition() 공개 정적인 메소드

Scale and move all Shapes and Contols within the GraphicsWindow. This method resizes and moves the view rather than the shapes, so their positions and other properties remain unchanged but appear scaled within the repositioned region. For example Shapes.GetLeft remains unchanged although the view has been repositioned and GraphicsWindow.MouseX reports the coordinates relative to the repositioned view. Imagine the entire view is repositioned as if it were a shape inside the GrapicsWindow. The transformation between view coordinates (vX,vY) and GraphicsWindow coordinates (gwX,gwY) is: gwX = (vX+panX)*scaleX + gw*(1-scaleX)/2 gwY = (vY+panY)*scaleY + gh*(1-scaleY)/2 All drawing remains within the original GraphicsWindow.
public static Reposition ( Primitive scaleX, Primitive scaleY, Primitive panX, Primitive panY, Primitive angle ) : void
scaleX Primitive The X direction scaling of the view.
scaleY Primitive The Y direction scaling of the view.
panX Primitive Pan the view in the X direction in the view scaling, 0 is centered in the GraphicsWindow.
panY Primitive Pan the view in the Y direction in the view scaling, 0 is centered in the GraphicsWindow.
angle Primitive An angle to rotate the view.
리턴 void

RepositionPoint() 공개 정적인 메소드

Get coordinates transformed between GraphicsWindow and a repositioned View (See Reposition).
public static RepositionPoint ( Primitive x, Primitive y, Primitive toGW ) : Primitive
x Primitive The x coordinate to transform.
y Primitive The x coordinate to transform.
toGW Primitive Transfer from View to GraphicsWindow ("True") or from GraphicsWindow to View ("False").
리턴 Primitive

ResumeUpdates() 공개 정적인 메소드

Resume GraphicsWindow Updates.
public static ResumeUpdates ( ) : void
리턴 void

SetActive() 공개 정적인 메소드

Set the GraphicsWindow as active (has focus).
public static SetActive ( ) : void
리턴 void

SetFontFromFile() 공개 정적인 메소드

Set font in GraphicsWindow from a local TTF font file.
public static SetFontFromFile ( Primitive fontFile ) : Primitive
fontFile Primitive Full path to font file to set.
리턴 Primitive

TransparentGW() 공개 정적인 메소드

Create a transparent GraphicsWindow. This must be the called before any other GraphicsWindow, Controls or Shapes methods that create a window. To see anything you must add something to the transparent GraphicsWindow. For example, create a non-rectangular window using a transparent border png with LDShapes.BackgroundImage. The transparency can be altered with GraphicsWindow.BackgroundColor. Sometimes less than 100% transparency can be required (e.g. to register mouse movements).
public static TransparentGW ( ) : void
리턴 void

프로퍼티 상세

_ClosingDelegate 공개적으로 정적으로 프로퍼티

public static SmallBasicCallback _ClosingDelegate
리턴 SmallBasicCallback