- Main Page
- Modules
- Files
- Related Pages

# output control
[g2 User Interface]

## Functions
void | g2_flush (int dev)
void | g2_save (int dev)
void | g2_clear (int dev)
void | g2_set_font_size (int dev, double size)
void | g2_set_line_width (int dev, double w)
void | g2_set_dash (int dev, int N, double *dashes)
void | g2_set_QP (int dev, double d, enum QPshape shape)
void | g2_query_pointer (int dev, double *x, double *y, unsigned int *button)
void | g2_get_pd_handles (int pd, void *handles[G2_PD_HANDLES_SIZE])

## Function Documentation

void g2_clear | ( | int | dev | ) |

  | Clear device Parameters:
  | dev | device number

void g2_flush | ( | int | dev | ) |

  | Flush output buffers. Parameters:
  | dev | device id

void g2_get_pd_handles | ( | int | pd,
|  | void * | handles[G2_PD_HANDLES_SIZE]
| ) |

  | Get pointers to physical device specific handles. This function should be used only if you are familiar with the g2 source code. For details see physical device source code (e.g. in src/X11/). Example usage can be found in demo/handles.c. Parameters:
  | pd | physical device
  | handles | returns pointers to physical device low level handles

void g2_query_pointer | ( | int | dev,
|  | double * | x,
|  | double * | y,
|  | unsigned int * | button
| ) |

  | Query pointer (e.g. mouse for X11) position and button state. See the demo program pointer.c for an example. Parameters:
  | dev | device
  | x | returns pointer x coordinate
  | y | returns pointer y coordinate
  | button | returns button state

void g2_save | ( | int | dev | ) |

  | Save output Parameters:
  | dev | device id

void g2_set_dash | ( | int | dev,
|  | int | N,
|  | double * | dashes
| ) |

  | Set line dash. Set N to 0 and dashes to NULL to restore solid line. Parameters:
  | dev | device
  | N | number of dash components (0 for solid line)
  | dashes | vector of dash lengths (black, white, black, ...)

void g2_set_font_size | ( | int | dev,
|  | double | size
| ) |

  | Set font size Parameters:
  | dev | device
  | size | new font size

void g2_set_line_width | ( | int | dev,
|  | double | w
| ) |

  | Set line width. Parameters:
  | dev | device
  | w | new line width

void g2_set_QP | ( | int | dev,
|  | double | d,
|  | enum QPshape | shape
| ) |

  | Set QuasiPixel size and shape. Parameters:
  | dev | device
  | d | size
  | shape | shape (rectangle or circle, see QPshape )