4#include <WXP/ColorBar.h>
5#include <WXP/ColorMap.h>
8#include <WXP/DomainVal.h>
9#include <WXP/EarthPoint.h>
10#include <WXP/EarthPoints.h>
11#include <WXP/GeomBox.h>
13#include <WXP/GridPoint.h>
15#include <WXP/Listener.h>
17#include <WXP/PlotAttr.h>
18#include <WXP/PlotLabel.h>
20#include <WXP/Points.h>
22#include <WXP/String.h>
23#include <WXP/Timezone.h>
31 static const int max_panel = 16;
33 Panel panels[max_panel];
51 static const int max_label = 30;
54 char label_format[100];
66 Plot(
const char *param );
69 int open(
const char *param );
72 int setParam(
const char *param );
73 int setLogo(
const char *rlogo );
74 inline int setFixed(
bool val ){
return graph.
setFixed( val ); };
75 int getDevice(
String &str );
76 void callback(
const char *ev_str,
const char *ev_data,
const void *data );
77 inline int permitCallbacks(
int val ){ permit_callbacks = val;
return 1; };
79 inline int setDefaultPanel(
const char *str ){
StrLib::copy( def_panel, 30, str );
return 1 ;};
80 int setPanel(
Rect &offset,
float aspect,
int halign,
int valign );
81 int setPanel(
Rect &offset,
float aspect );
83 int setPanel(
Domain &domain );
84 int setPanel(
Rect &offset );
86 int setPanel(
int ind );
87 int setPanelDomain(
int ind,
Domain &dom );
88 int getPanelDomain(
int ind,
Domain &dom );
89 int setDomain(
Rect &offset,
float aspect,
int halign,
int valign );
90 int setDomain(
Rect &offset,
float aspect );
91 int setDomain(
Rect &offset,
Domain &ndomain );
92 int setDomain(
Domain &domain );
94 int setDomain(
Rect &offset );
102 float getDomAspect();
110 bool withinDomain(
Point &pt );
112 bool withinDomainExt(
Point &pt,
int ext );
113 bool withinDomainExt(
EarthPoint &ept,
int ext );
114 int whereDomain(
Point &pt );
117 int newPanel(
const char *params );
119 int clearRect(
Rect &rect );
122 inline bool isManaged(){
return graph.
isManaged(); };
125 inline bool isTimeSync(){
return time_sync; };
126 inline int setTimeSync(
bool val ){ time_sync = val;
return 1; };
127 inline int setDate(
Date &rdate ){ date = rdate;
return 1; };
128 inline bool isDateSet(){
return date.
isSet(); };
129 inline int setForeHour(
float val ){ fore_hour = val;
return 1; };
130 int setDataSource(
const char *str );
134 inline int getNumFill(){
return colormap.
getNumFill(); };
137 int getColorRGB(
int ind,
float &r,
float &g,
float &b );
138 int getColorValue(
const char *name );
141 int cropLine(
Points &pts );
142 int drawLine(
float x1,
float y1,
float x2,
float y2 );
150 int drawRect(
float x1,
float y1,
float x2,
float y2 );
160 int setLine(
const char *str );
171 int setFill(
const char *str );
173 int drawText(
float x,
float y,
const char *text );
179 int setTextHeight(
float height );
180 int setTextWeight(
float weight );
181 int setTextAlign(
int hor,
int vert );
184 int setTextExpansion(
float expansion );
185 int setTextSpacing(
float space );
186 int setTextCharWidth(
float width );
188 int setFont(
const char *str );
189 inline int setDropShadow(
int val ){
return graph.
setDropShadow( val ); };
194 int setText(
const char *str );
200 int setMarkColor(
const char *name );
201 int setMarkColor(
int ind );
202 int setMarkType(
const char *type );
203 int setMarkType(
int type );
204 int setMarkSize(
float size );
205 int setMarkWeight(
float weight );
209 int setMark(
const char *str );
211 inline int setSymbol(
const char *symbol ){
215 inline int drawSymbol(
Point pt,
const char *
string,
float size ){
219 int setImageAlign(
int h,
int v );
220 int drawImage(
Image &image );
221 int drawImage(
Image &image,
int bgcolor );
223 inline int drawImage(
Image &image,
float x,
float y ){
227 inline int drawImage(
Image &image,
int bgcolor,
float x,
float y ){
228 return graph.
drawImage( image, bgcolor, x, y );
231 int drawImage(
const char *file,
float x,
float y );
232 int drawImage(
const char *file,
float x,
float y,
const char *option );
234 inline int getTran(){
238 inline int activateTran(
int val ){
242 inline int setViewport(
int num,
Rect rect ){
246 inline int getViewport(
Rect &lim ){
250 inline int setWindow(
int num,
Rect rect ){
254 inline int getWindow(
Rect &lim ){
259 return panels[cur_panel].domain.
tran( ept, pt );
263 return panels[cur_panel].domain.
tran( pt, ept );
267 return panels[cur_panel].domain.
tran( gpt, pt );
271 return panels[cur_panel].domain.
tran( pt, gpt );
275 return panels[cur_panel].domain.
tran( ept, gpt );
279 return panels[cur_panel].domain.
tran( gpt, ept );
282 inline int tran(
int val,
Point &pt ){
283 return panels[cur_panel].domain.
tran( val, pt );
286 inline int tran(
int val,
GridPoint &gpt ){
287 return panels[cur_panel].domain.
tran( val, gpt );
291 return panels[cur_panel].domain.
tran( val, ept );
298 int tranPlotWindow(
float x1,
float y1,
float &x2,
float &y2 );
300 inline int tranWindow(
int tran1,
Point &pt1,
int tran2,
Point &pt2 ){
301 return graph.
tranWindow( tran1, pt1, tran2, pt2 );
304 inline int adjustDom(
Point &pt ){
305 return panels[cur_panel].domain.
adjust( pt );
308 inline int adjustDom(
Points &pts ){
309 return panels[cur_panel].domain.
adjust( pts );
312 inline float adjustDir(
float dir,
Point &pt ){
313 return panels[cur_panel].domain.
adjustDir( dir, pt );
316 inline int offsetPoint(
Point pt,
float dir,
float rad,
Point &opt ){
317 return panels[cur_panel].domain.
offset( pt, dir, rad, opt );
321 return panels[cur_panel].domain.
offsetLatLon( pt, dir, rad, opt );
328 inline int getInverse(){
332 int addCallback(
const char *ev,
Listener *list,
const void *data );
333 int message(
const char *str, ... );
335 int getViewDomain(
Domain &domain );
337 int saveImage(
const char *file,
const char *type);
338 int saveImage(
const char *file);
339 int getImage(
Image &image);
342 int addLabel(
const char *loc,
const char *label );
343 int setLabel(
const char *loc,
const char *label );
344 int getLabelPosIndex(
const char *str );
346 int formatLabel(
const char *form,
char *str,
int len );
349 int setBarLocate(
const char *str );
350 int setBarRange(
Range &rrange );
354 int drawBar(
Range &rrange );
357 int setCursor(
int type );
361 int deleteFrame(
int ind );
362 int deleteAllFrames();
363 int setFull(
int val );
365 int setDrawing(
const char *str );
366 bool isDrawing(
int ind );
368 inline int wrapLine(
Points &pts ){
return panels[cur_panel].domain.
wrapLine( pts ); };
369 inline int offsetLine(
Points &pts,
int flag ){
return panels[cur_panel].domain.
offsetLine( pts, flag ); };
371 inline int printTran(){ graph.
printTran();
return 1; };
372 inline int printDomain(){ panels[cur_panel].domain.
print();
return 1; };
374 static int decodeGeometryStr(
const char *str,
GeomBox &geom );
375 static int decodePanelStr(
Rect rect,
const char *str,
GeomBox &geom );
This class sets up color fill parameters.
Definition ColorFill.h:8
This class defines a specific color map. This is a mapping between color indices, color names and RGB...
Definition ColorMap.h:8
int getNumFill()
Definition ColorMap.h:38
This class stores date and time information.
Definition Date.h:8
bool isSet()
Definition Date.cc:100
This class stores and manipulates domain data.
Definition Domain.h:19
int print()
Definition Domain.cc:2035
int offsetLine(Point &pt1, Point &pt2, int flag)
Definition Domain.cc:1932
int tran(EarthPoint &ept, Point &pt)
Definition Domain.cc:440
int offset(Point &pt, float dir, float rad, Point &opt)
Definition Domain.cc:1768
int wrapLine(Point &pt1, Point &pt2)
Definition Domain.cc:1861
float getMapFactor(EarthPoint &ept)
Definition Domain.cc:1830
float adjustDir(float dir, Point &pt)
Definition Domain.cc:1562
static int translate(Domain &dom1, Domain &dom2, Point &pt1, Point &pt2)
Definition Domain.cc:1466
static int offsetLatLon(EarthPoint &ept, float dir, float rad, EarthPoint &opt)
Definition Domain.cc:1784
int adjust(Point &pt)
Definition Domain.cc:1511
This class creates an array a earth points (lat, lon)
Definition EarthPoints.h:9
This class creates and accesses satellite enhancement files.
Definition Enhance.h:7
This structure sets size and location of a geometric box.
Definition GeomBox.h:5
This class plots to a device independent graphics interface.
Definition Graph.h:18
int activateTran()
Definition Graph.cc:599
int getDropShadow()
Definition Graph.cc:1365
int setDropShadow(int val)
Definition Graph.cc:1356
int getTran()
Definition Graph.cc:591
int setWindow(int num, Rect &rect)
Definition Graph.cc:553
int drawSymbol(float ox, float oy, const char *string, float size)
Definition Graph.cc:1724
int setSymbol(const char *file)
Definition Graph.cc:1707
int printTran()
Definition Graph.cc:1915
int getWindow(Rect &rect)
Definition Graph.cc:572
int drawImage(Image &image, float x, float y)
Definition Graph.cc:1801
bool isManaged()
Definition Graph.h:83
int setFixed(bool val)
Definition Graph.cc:289
int tranWindow(int tran1, float x1, float y1, int tran2, float &x2, float &y2)
Definition Graph.cc:662
bool getInverse()
Definition Graph.cc:332
int setViewport(int num, Rect &rect)
Definition Graph.cc:479
int getViewport(Rect &rect)
Definition Graph.cc:498
This class defines an image.
Definition Image.h:19
This virtual class defines the callback method for use with plotting.
Definition Listener.h:11
This class stores plot attributes.
Definition PlotAttr.h:8
This class defines mid-level graphics commands. Calls the Graph object for actual graphics output.
Definition Plot.h:26
int setLineWidth(float width)
Definition Plot.cc:1465
int drawLine(float x1, float y1, float x2, float y2)
Definition Plot.cc:1096
int update()
Definition Plot.cc:879
int setLineStyle(int style)
Definition Plot.cc:1473
void callback(const char *ev_str, const char *ev_data, const void *data)
Definition Plot.cc:300
~Plot()
Definition Plot.cc:248
int drawMark(float x, float y)
Definition Plot.cc:1867
int setTextColor(const char *name)
Definition Plot.cc:1740
int setLine()
Definition Plot.cc:1480
int drawCircle(Point &pt, float rad)
Definition Plot.cc:1400
int setText()
Definition Plot.cc:1808
int drawFillarea(Points &data)
Definition Plot.cc:1561
int setLabelFormat(const char *str)
Definition Plot.cc:2199
int setFill()
Definition Plot.cc:1628
int open()
Definition Plot.cc:234
int setColorMap(ColorMap &cmap)
Definition Plot.cc:944
int end()
Definition Plot.cc:869
int drawSpline(Points &data)
Definition Plot.cc:1265
int setFillColor(const char *name)
Definition Plot.cc:1589
int setFillStyle(int index)
Definition Plot.cc:1621
int manage()
Definition Plot.cc:889
int allocColor(int ind)
Definition Plot.cc:927
int addLabel(const char *loc, const char *label)
Definition Plot.cc:2209
int setTextDirection(float x, float y)
Definition Plot.cc:1797
ColorMap getColorMap()
Definition Plot.cc:912
int drawText(float x, float y, const char *text)
Definition Plot.cc:1670
int drawRect(float x1, float y1, float x2, float y2)
Definition Plot.cc:1379
int drawFill(Points &pts)
Definition Plot.cc:1529
int setLabelColor(const char *str)
Definition Plot.cc:2190
int setLineColor(const char *name)
Definition Plot.cc:1433
int setLabel(const char *loc, const char *label)
Definition Plot.cc:2224
Plot()
Definition Plot.cc:45
int drawFormText(Point &pt, const char *format,...)
Definition Plot.cc:1704
int setMark()
Definition Plot.cc:1938
int close()
Definition Plot.cc:241
This class creates an array a 2D points (x, y)
Definition Points.h:8
static int copy(char *s1, int len1, const char s2)
Definition StrLib.cc:506
This is a variable length string class.
Definition String.h:5
This class manipulates timezones.
Definition Timezone.h:5
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This class holds data to plot a color bar.
Definition ColorBar.h:9
This struct defines basic domain parameters.
Definition DomainVal.h:5
This struct defines earth point values (lat, lon, elev)
Definition EarthPoint.h:5
This struct defines basic gridpoint values.
Definition GridPoint.h:5
This defines a plotting region and its attributes.
Definition Panel.h:8
This struct stores labels for plot annotation.
Definition PlotLabel.h:5
This struct sets a 3D point (x, y, z)
Definition Point.h:5
This struct defines a simple range of values.
Definition Range.h:5
This structure defines rectangle coordinates.
Definition Rect.h:5