C# Class Paint.HorizontalGauge

Horizontal gauge.
Inheritance: Gauge
Mostrar archivo Open project: RandolphBurt/MonoGame-iOS-SimplePaint

Public Methods

Method Description
HandleTouch ( float xPosition ) : void

Handles a particular touch/gesture made by the user

HorizontalGauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System

Initializes a new instance of the Paint.HorizontalGauge class.

Protected Methods

Method Description
CreateGaugeRectangle ( ) : Rectangle

Simply creates a rectangle that defines the location and size of the gauge

CreateMarkerRectangle ( ) : Rectangle

Creates a rectangle that defines the location and size of the marker

HandleTouch ( ITouchPoint touch ) : void

Handles a particular touch/gesture made by the user

Private Methods

Method Description
BoundedX ( int xPosition ) : int

Ensures the specified x co-ordinate is inside the bounds of the gauage

Method Details

CreateGaugeRectangle() protected method

Simply creates a rectangle that defines the location and size of the gauge
protected CreateGaugeRectangle ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

CreateMarkerRectangle() protected method

Creates a rectangle that defines the location and size of the marker
protected CreateMarkerRectangle ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

HandleTouch() protected method

Handles a particular touch/gesture made by the user
protected HandleTouch ( ITouchPoint touch ) : void
touch ITouchPoint /// The position and type of gesture/touch made ///
return void

HandleTouch() public method

Handles a particular touch/gesture made by the user
public HandleTouch ( float xPosition ) : void
xPosition float /// The x-position of the touch /// (This is all we are interested in) ///
return void

HorizontalGauge() public method

Initializes a new instance of the Paint.HorizontalGauge class.
public HorizontalGauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System
backgroundColor Color
graphicsDisplay IGraphicsDisplay
bounds Microsoft.Xna.Framework.Rectangle
markerWidth int
gaugeColor Color
startMarker float
return System