C# Class OpenRA.Graphics.RgbaColorRenderer

Inheritance: Renderer.IBatchRenderer
Datei anzeigen Open project: pchote/OpenRA Class Usage Examples

Public Methods

Method Description
DrawLine ( IEnumerable points, float width, Color color, bool connectSegments = false ) : void
DrawLine ( IEnumerable points, float width, Color color, bool connectSegments = false ) : void
DrawLine ( float3 start, float3 end, float width, Color color ) : void
DrawLine ( float3 start, float3 end, float width, Color startColor, Color endColor ) : void
DrawPolygon ( float2 vertices, float width, Color color ) : void
DrawPolygon ( float3 vertices, float width, Color color ) : void
DrawRect ( float3 tl, float3 br, float width, Color color ) : void
FillEllipse ( float3 tl, float3 br, Color color, int vertices = 32 ) : void
FillRect ( float3 tl, float3 br, Color color ) : void
FillRect ( float3 a, float3 b, float3 c, float3 d, Color color ) : void
Flush ( ) : void
RgbaColorRenderer ( Renderer renderer, IShader shader ) : System
SetDepthPreviewEnabled ( bool enabled ) : void
SetViewportParams ( Size screen, float depthScale, float depthOffset, float zoom, int2 scroll ) : void

Private Methods

Method Description
DrawConnectedLine ( float3 points, float width, Color color, bool closed ) : void
DrawDisconnectedLine ( IEnumerable points, float width, Color color ) : void
IntersectionOf ( float3 a, float3 da, float3 b, float3 db ) : float3

Calculate the 2D intersection of two lines. Will behave badly if the lines are parallel. Z position is the average of a and b (ignores actual intersection point if it exists)

Method Details

DrawLine() public method

public DrawLine ( IEnumerable points, float width, Color color, bool connectSegments = false ) : void
points IEnumerable
width float
color Color
connectSegments bool
return void

DrawLine() public method

public DrawLine ( IEnumerable points, float width, Color color, bool connectSegments = false ) : void
points IEnumerable
width float
color Color
connectSegments bool
return void

DrawLine() public method

public DrawLine ( float3 start, float3 end, float width, Color color ) : void
start float3
end float3
width float
color Color
return void

DrawLine() public method

public DrawLine ( float3 start, float3 end, float width, Color startColor, Color endColor ) : void
start float3
end float3
width float
startColor Color
endColor Color
return void

DrawPolygon() public method

public DrawPolygon ( float2 vertices, float width, Color color ) : void
vertices float2
width float
color Color
return void

DrawPolygon() public method

public DrawPolygon ( float3 vertices, float width, Color color ) : void
vertices float3
width float
color Color
return void

DrawRect() public method

public DrawRect ( float3 tl, float3 br, float width, Color color ) : void
tl float3
br float3
width float
color Color
return void

FillEllipse() public method

public FillEllipse ( float3 tl, float3 br, Color color, int vertices = 32 ) : void
tl float3
br float3
color Color
vertices int
return void

FillRect() public method

public FillRect ( float3 tl, float3 br, Color color ) : void
tl float3
br float3
color Color
return void

FillRect() public method

public FillRect ( float3 a, float3 b, float3 c, float3 d, Color color ) : void
a float3
b float3
c float3
d float3
color Color
return void

Flush() public method

public Flush ( ) : void
return void

RgbaColorRenderer() public method

public RgbaColorRenderer ( Renderer renderer, IShader shader ) : System
renderer Renderer
shader IShader
return System

SetDepthPreviewEnabled() public method

public SetDepthPreviewEnabled ( bool enabled ) : void
enabled bool
return void

SetViewportParams() public method

public SetViewportParams ( Size screen, float depthScale, float depthOffset, float zoom, int2 scroll ) : void
screen System.Drawing.Size
depthScale float
depthOffset float
zoom float
scroll int2
return void