4
4
// Written by David Luff, started 2005.
6
// Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk
6
// Copyright (C) 2005 - David C Luff - daveluff AT ntlworld.com
8
8
// This program is free software; you can redistribute it and/or
9
9
// modify it under the terms of the GNU General Public License as
60
60
RenderArea2D(int logx, int logy, int sizex, int sizey, int posx, int posy);
63
void draw(osg::State& state);
65
63
void SetPixelColor(const float* rgba);
66
64
void SetBackgroundColor(const float* rgba);
67
65
void SetPosition(int posx, int posy);
73
71
// Set clip region to be the same as the rendered area (default)
74
72
void ResetClipRegion();
76
// Drawing specified in logical units
74
// The DrawXXX functions place the shapes in the buffer, specified
75
// in logical units, and clipped to the current clip region.
76
void DrawPixel(int x, int y, bool invert = false);
77
77
void DrawLine(int x1, int y1, int x2, int y2);
78
78
void DrawQuad(int x1, int y1, int x2, int y2, bool invert = false);
79
79
void DrawBackground();
80
// Draw a pixel specified by *logical* position
81
void DrawPixel(int x, int y, bool invert = false);
83
// The old drawing functions have been renamed in order to buffer the drawing for FG
85
// Drawing specified in logical units
86
void oldDrawLine(int x1, int y1, int x2, int y2);
87
void oldDrawQuad(int x1, int y1, int x2, int y2, bool invert = false);
88
void oldDrawBackground();
89
// Draw a pixel specified by *logical* position
90
void oldDrawPixel(int x, int y, bool invert = false);
92
// Flush the buffer pipeline
81
// Call Draw to have the buffer contents drawn and then cleared.
82
void Draw(osg::State& state);
84
// Clear the buffer contents
95
87
// Turn debugging on or off.
104
96
float _backgroundColor[4];
105
97
float _pixelColor[4];
107
// Actual drawing routines copied from Atlas
108
void doSetColor( const float *rgb );
109
void doDrawQuad( const SGVec2f *p);
110
void doDrawQuad( const SGVec2f *p, const SGVec4f *color );
99
// Drawing specified in logical units
100
void DoDrawPixel(int x, int y, bool invert = false);
101
void DoDrawLine(int x1, int y1, int x2, int y2);
102
void DoDrawQuad(int x1, int y1, int x2, int y2, bool invert = false);
103
void DoDrawBackground();
105
// Actual rendering routines copied from Atlas
106
void SetRenderColor( const float *rgb );
107
void RenderQuad( const SGVec2f *p);
108
void RenderQuad( const SGVec2f *p, const SGVec4f *color );
112
110
vector<RA2DPrimitive> drawing_list;