C# 클래스 AGENT.Contrib.Drawing.Drawing

파일 보기 프로젝트 열기: nothingmn/AGENT.Contrib 1 사용 예제들

공개 메소드들

메소드 설명
DrawAlignedText ( Microsoft.SPOT.Bitmap screen, System.Color color, Microsoft.SPOT.Font font, string inString, HAlign align, int margin, VAlign vAlign, int vMargin ) : void

Draw text in a vertical and horizontal position When "align" is "Center" then "margin" is ignored. Also when "vAlign" is "Middle" then "vMargin" is ignored.

DrawBattery ( Microsoft.SPOT.Bitmap screen, Point batteryPosition, int batteryWidth, int batteryHeight, int borderThickness, System.Color batteryColor, System.Color backColor, bool charging, int batteryLevel ) : Size

Draw a simple battery to the screen

DrawImageAtPoint ( Microsoft.SPOT.Bitmap screen, byte imageData, Microsoft.SPOT.Bitmap imageType, Point point ) : void

Draw an image at a specific points

DrawImageCentered ( Microsoft.SPOT.Bitmap screen, byte imageData, Microsoft.SPOT.Bitmap imageType ) : void

Draw an image centered

DrawPoly ( Microsoft.SPOT.Bitmap screen, Point points, System.Color borderColor, short borderWidth, System.Color fillColor, PolyFill polyFill ) : void

Draws polygon from list of points and fill it with specififed pattern.

DrawTextCentered ( Microsoft.SPOT.Bitmap screen, string text, Microsoft.SPOT.Font font, System.Color color ) : void

Draw text right in the center of the screen

DrawTray ( Microsoft.SPOT.Bitmap screen, IProvideNotifications notificationProvider, Microsoft.SPOT.Font font ) : void
Drawing ( Microsoft.SPOT.Bitmap screen = null ) : System
FillArea ( Microsoft.SPOT.Bitmap screen, System.Color color, Point point ) : void

This method fills an area which surrounded by line(s). Not only polygon but also circle, pentagram, cloud shaped... any figure. Only you need to fill is set Bitmap, Color, certain X and Y to argument. Both X and Y should be exist inner line(s).

FindCenter ( string text, Microsoft.SPOT.Font font ) : Point

Find the center of the screen, for the given text and font

HourHandLocation ( int hour, int minute ) : Point

Determin the hour hand point

MeasureString ( string text, Microsoft.SPOT.Font font ) : int

Measure the width that a set of text will take for a given font

MinuteHandLocation ( int minute, int second ) : Point

Determine where the outer point for the minute hand would be

PaintHands ( Microsoft.SPOT.Bitmap screen, System.Color foreColor, int hourWidth, int minuteWidth, int secondWidth, int hour, int minute, int second ) : void

Paint all hands, a 0 width will not force the hand to not print.

PaintHourHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int hour, int minute ) : void

Paint the hour hand, with a given thickness

PaintLine ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, Point start, Point end ) : void

Paint a line from two points

PaintMinuteHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int minute, int second ) : void

Paint the minute hand, with a given thickness

PaintSecondHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int second ) : void

Paint the seconds hand, with a given thickness

PaintSkinnyHands ( Microsoft.SPOT.Bitmap screen, System.DateTime time, Point center ) : void
SecondHandLocation ( int second ) : Point

Determine determine the seconds hand point location

비공개 메소드들

메소드 설명
PointOnCircle ( float radius, float angleInDegrees, Point origin ) : Point
_DrawUnfilledPoly ( Microsoft.SPOT.Bitmap screen, Point points, System.Color borderColor, short borderWidth, Point basePoint ) : void

메소드 상세

DrawAlignedText() 공개 메소드

Draw text in a vertical and horizontal position When "align" is "Center" then "margin" is ignored. Also when "vAlign" is "Middle" then "vMargin" is ignored.
public DrawAlignedText ( Microsoft.SPOT.Bitmap screen, System.Color color, Microsoft.SPOT.Font font, string inString, HAlign align, int margin, VAlign vAlign, int vMargin ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
font Microsoft.SPOT.Font
inString string
align HAlign
margin int
vAlign VAlign
vMargin int
리턴 void

DrawBattery() 공개 메소드

Draw a simple battery to the screen
public DrawBattery ( Microsoft.SPOT.Bitmap screen, Point batteryPosition, int batteryWidth, int batteryHeight, int borderThickness, System.Color batteryColor, System.Color backColor, bool charging, int batteryLevel ) : Size
screen Microsoft.SPOT.Bitmap
batteryPosition Point
batteryWidth int
batteryHeight int
borderThickness int
batteryColor System.Color
backColor System.Color
charging bool
batteryLevel int
리턴 Size

DrawImageAtPoint() 공개 메소드

Draw an image at a specific points
public DrawImageAtPoint ( Microsoft.SPOT.Bitmap screen, byte imageData, Microsoft.SPOT.Bitmap imageType, Point point ) : void
screen Microsoft.SPOT.Bitmap
imageData byte
imageType Microsoft.SPOT.Bitmap
point Point
리턴 void

DrawImageCentered() 공개 메소드

Draw an image centered
public DrawImageCentered ( Microsoft.SPOT.Bitmap screen, byte imageData, Microsoft.SPOT.Bitmap imageType ) : void
screen Microsoft.SPOT.Bitmap
imageData byte
imageType Microsoft.SPOT.Bitmap
리턴 void

DrawPoly() 공개 메소드

Draws polygon from list of points and fill it with specififed pattern.
public DrawPoly ( Microsoft.SPOT.Bitmap screen, Point points, System.Color borderColor, short borderWidth, System.Color fillColor, PolyFill polyFill ) : void
screen Microsoft.SPOT.Bitmap Bitmap to draw on
points Point Array of points defining polygon
borderColor System.Color Color of poly border
borderWidth short Poly border width
fillColor System.Color Color to use to fill poly
polyFill PolyFill Fill patern. Empty will simply draw unfilled poly
리턴 void

DrawTextCentered() 공개 메소드

Draw text right in the center of the screen
public DrawTextCentered ( Microsoft.SPOT.Bitmap screen, string text, Microsoft.SPOT.Font font, System.Color color ) : void
screen Microsoft.SPOT.Bitmap
text string
font Microsoft.SPOT.Font
color System.Color
리턴 void

DrawTray() 공개 메소드

public DrawTray ( Microsoft.SPOT.Bitmap screen, IProvideNotifications notificationProvider, Microsoft.SPOT.Font font ) : void
screen Microsoft.SPOT.Bitmap
notificationProvider IProvideNotifications
font Microsoft.SPOT.Font
리턴 void

Drawing() 공개 메소드

public Drawing ( Microsoft.SPOT.Bitmap screen = null ) : System
screen Microsoft.SPOT.Bitmap
리턴 System

FillArea() 공개 메소드

This method fills an area which surrounded by line(s). Not only polygon but also circle, pentagram, cloud shaped... any figure. Only you need to fill is set Bitmap, Color, certain X and Y to argument. Both X and Y should be exist inner line(s).
public FillArea ( Microsoft.SPOT.Bitmap screen, System.Color color, Point point ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
point Point
리턴 void

FindCenter() 공개 메소드

Find the center of the screen, for the given text and font
public FindCenter ( string text, Microsoft.SPOT.Font font ) : Point
text string
font Microsoft.SPOT.Font
리턴 Point

HourHandLocation() 공개 메소드

Determin the hour hand point
public HourHandLocation ( int hour, int minute ) : Point
hour int
minute int
리턴 Point

MeasureString() 공개 메소드

Measure the width that a set of text will take for a given font
public MeasureString ( string text, Microsoft.SPOT.Font font ) : int
text string
font Microsoft.SPOT.Font
리턴 int

MinuteHandLocation() 공개 메소드

Determine where the outer point for the minute hand would be
public MinuteHandLocation ( int minute, int second ) : Point
minute int
second int
리턴 Point

PaintHands() 공개 메소드

Paint all hands, a 0 width will not force the hand to not print.
public PaintHands ( Microsoft.SPOT.Bitmap screen, System.Color foreColor, int hourWidth, int minuteWidth, int secondWidth, int hour, int minute, int second ) : void
screen Microsoft.SPOT.Bitmap
foreColor System.Color
hourWidth int
minuteWidth int
secondWidth int
hour int
minute int
second int
리턴 void

PaintHourHand() 공개 메소드

Paint the hour hand, with a given thickness
public PaintHourHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int hour, int minute ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
thickness int
hour int
minute int
리턴 void

PaintLine() 공개 메소드

Paint a line from two points
public PaintLine ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, Point start, Point end ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
thickness int
start Point
end Point
리턴 void

PaintMinuteHand() 공개 메소드

Paint the minute hand, with a given thickness
public PaintMinuteHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int minute, int second ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
thickness int
minute int
second int
리턴 void

PaintSecondHand() 공개 메소드

Paint the seconds hand, with a given thickness
public PaintSecondHand ( Microsoft.SPOT.Bitmap screen, System.Color color, int thickness, int second ) : void
screen Microsoft.SPOT.Bitmap
color System.Color
thickness int
second int
리턴 void

PaintSkinnyHands() 공개 메소드

public PaintSkinnyHands ( Microsoft.SPOT.Bitmap screen, System.DateTime time, Point center ) : void
screen Microsoft.SPOT.Bitmap
time System.DateTime
center Point
리턴 void

SecondHandLocation() 공개 메소드

Determine determine the seconds hand point location
public SecondHandLocation ( int second ) : Point
second int
리턴 Point