ProcessViewBrowser-ServerProgramming
Functions
Graphics

Functions

int pvSetZoomX (PARAM *p, int id, float zoom)
int pvSetZoomY (PARAM *p, int id, float zoom)
int gWriteFile (const char *file)
int gCloseFile ()
int gBeginDraw (PARAM *p, int id)
int gBox (PARAM *p, int x, int y, int w, int h)
int gRect (PARAM *p, int x, int y, int w, int h)
int gEndDraw (PARAM *p)
int gLineTo (PARAM *p, int x, int y)
int gBufferedLine (PARAM *p)
int gLine (PARAM *p, float *x, float *y, int n)
int gMoveTo (PARAM *p, int x, int y)
int gRightYAxis (PARAM *p, float start, float delta, float end, int draw)
int gSetColor (PARAM *p, int r, int g, int b)
int gSetWidth (PARAM *p, int w)
int gSetStyle (PARAM *p, int style)
int gDrawArc (PARAM *p, int x, int y, int w, int h, int start_angle, int angle_length)
int gDrawPie (PARAM *p, int x, int y, int w, int h, int start_angle, int angle_length)
int gDrawPolygon (PARAM *p, int *x, int *y, int n)
int gSetFont (PARAM *p, const char *family, int size, int weight, int italic)
int gSetLinestyle (PARAM *p, int style)
int gText (PARAM *p, int x, int y, const char *text, int alignment)
int gTextInAxis (PARAM *p, float x, float y, const char *text, int alignment)
int gSetFloatFormat (PARAM *p, const char *text)
int gXAxis (PARAM *p, float start, float delta, float end, int draw)
int gYAxis (PARAM *p, float start, float delta, float end, int draw)
int gXGrid (PARAM *p)
int gYGrid (PARAM *p)
int gBoxWithText (PARAM *p, int x, int y, int w, int h, int fontsize, const char *xlabel, const char *ylabel, const char *rylabel)
int gComment (PARAM *p, const char *comment)
int gPlaySVG (PARAM *p, const char *filename)
int gSocketPlaySVG (PARAM *p, const char *svgstring)
int gTranslate (PARAM *p, float x, float y)
int gRotate (PARAM *p, float angle)
int gScale (PARAM *p, float sx, float sy)
int pvSetSelector (PARAM *p, int id, int state)
int pvPrintSvgOnPrinter (PARAM *p, int id)

Detailed Description

These are the graphis routines usable with pyQDrawWidget()


Function Documentation

int gBeginDraw ( PARAM p,
int  id 
)
Call this function before you start drawing the widget.
int gBox ( PARAM p,
int  x,
int  y,
int  w,
int  h 
)
Draws a rectangle frame. Later you can use it's coordinates to draw xAxis, yAxiy and ryAxis.
int gBoxWithText ( PARAM p,
int  x,
int  y,
int  w,
int  h,
int  fontsize,
const char *  xlabel,
const char *  ylabel,
const char *  rylabel 
)
This is a convenience function that draws a box and write the xlabel ylabel and rylabel
in the given font.
If one of the text parameters is NULL no text is drawn for that item.
int gBufferedLine ( PARAM p)
Draw a line in a Axis.
See pvXYAllocate
See also Linestyle.
int gCloseFile ( )
Call this function after you have written graphical commands to a file.
int gComment ( PARAM p,
const char *  comment 
)
Write a comment in the metafile
int gDrawArc ( PARAM p,
int  x,
int  y,
int  w,
int  h,
int  start_angle,
int  angle_length 
)
Draw an arc. For circle write:
  gDrawArc(p,x-radius/2,y-radius/2,radius/2,radius/2,0,360);
int gDrawPie ( PARAM p,
int  x,
int  y,
int  w,
int  h,
int  start_angle,
int  angle_length 
)
Draw an pie (filled part of a circle) . For filled circle write:
  gDrawArc(p,x-radius/2,y-radius/2,radius/2,radius/2,0,360);
int gDrawPolygon ( PARAM p,
int *  x,
int *  y,
int  n 
)
x,y is an array with the edge points.
n is the number of points
int gEndDraw ( PARAM p)
Call this function when you are finished with drawing.
int gLine ( PARAM p,
float *  x,
float *  y,
int  n 
)
Draw a line in a Axis n=number of values in x,y.
See also Linestyle.
int gLineTo ( PARAM p,
int  x,
int  y 
)
Draw a line from the actual position to x,y.
int gMoveTo ( PARAM p,
int  x,
int  y 
)
Move to x,y.
int gPlaySVG ( PARAM p,
const char *  filename 
)
Play SVG file
You have to download the file first using:
int pvDownloadFile(PARAM *p, const char *filename);
Attention:
This is a deprecated function.
It only works with the Qt3 version of pvbrowser client.
Now use rlSvgAnumator from rllib.
int gRect ( PARAM p,
int  x,
int  y,
int  w,
int  h 
)
Draws a filled rectangle.
int gRightYAxis ( PARAM p,
float  start,
float  delta,
float  end,
int  draw 
)
Draw a Axis on the right side of the diagram.
It starts with start in steps of delta until end is reached.
int gRotate ( PARAM p,
float  angle 
)
Rotate the graphic
Rotates the coordinate system angle degrees counterclockwise.
int gScale ( PARAM p,
float  sx,
float  sy 
)
Scale the graphic
int gSetColor ( PARAM p,
int  r,
int  g,
int  b 
)
Set the drawing color.
int gSetFloatFormat ( PARAM p,
const char *  text 
)
Set the format in which the Axis is drawn.
default: "%f"
For example set
"%5.2f"
if you want two digits behind the .
int gSetFont ( PARAM p,
const char *  family,
int  size,
int  weight,
int  italic 
)
Set a font. For the availabe fonts see Definitions (Events, Fonts, Colors ...)
int gSetLinestyle ( PARAM p,
int  style 
)
Set the linestyle of a line in the Axis. You can draw a simple line or a line with centered symbols.
int gSetStyle ( PARAM p,
int  style 
)
style = PenStyle.
int gSetWidth ( PARAM p,
int  w 
)
Set the line width
int gSocketPlaySVG ( PARAM p,
const char *  svgstring 
)
Play SVG string over the socket
Attention:
This is a deprecated function.
It only works with the Qt3 version of pvbrowser client.
Now use rlSvgAnumator from rllib.
int gText ( PARAM p,
int  x,
int  y,
const char *  text,
int  alignment 
)
Draw a text at x,y.
For alignment see Definitions (Events, Fonts, Colors ...)
int gTextInAxis ( PARAM p,
float  x,
float  y,
const char *  text,
int  alignment 
)
Draw a text at x,y in Axis.
For alignment see Definitions (Events, Fonts, Colors ...)
int gTranslate ( PARAM p,
float  x,
float  y 
)
Translate the graphic
int gWriteFile ( const char *  file)
Call this function before you write graphical commands to a file.
int gXAxis ( PARAM p,
float  start,
float  delta,
float  end,
int  draw 
)
Draw a Axis on the bottom of the diagram.
It starts with start in steps of delta until end is reached.
int gXGrid ( PARAM p)
Draw a grid orthogonal to the x-axis in the diagram.
int gYAxis ( PARAM p,
float  start,
float  delta,
float  end,
int  draw 
)
Draw a Axis on the left side of the diagram.
It starts with start in steps of delta until end is reached.
int gYGrid ( PARAM p)
Draw a grid orthogonal to the y-axis in the diagram.
int pvPrintSvgOnPrinter ( PARAM p,
int  id 
)
Print the SVG on the QDraw widget on a printer
int pvSetSelector ( PARAM p,
int  id,
int  state 
)
Set Selector in QDraw Widget 0|1
default 1
int pvSetZoomX ( PARAM p,
int  id,
float  zoom 
)
Zoom the image in X direction. (default: zoom=1.0)
If zoom < 0.0 then keep aspect ratio, factor = |zoom|.
int pvSetZoomY ( PARAM p,
int  id,
float  zoom 
)
Zoom the image in Y direction. (default: zoom=1.0)
If zoom < 0.0 then keep aspect ratio, factor = |zoom|.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines