package gr

  1. Overview
  2. Docs
type id
type workstation_type =
  1. | WISS
    (*

    Workstation Independent Segment ptr Storage

    *)
  2. | WinGDI
    (*

    Windows ptr GDI

    *)
  3. | PS_1
    (*

    PostScript (b/w @-> color)

    *)
  4. | PS_2
    (*

    PostScript (b/w @-> color)

    *)
  5. | PS_3
    (*

    PostScript (b/w @-> color)

    *)
  6. | PS_4
    (*

    PostScript (b/w @-> color)

    *)
  7. | PDFPlain
    (*

    Portable Document Format ptr plain

    *)
  8. | PDFCompressed
    (*

    Portable Document Format ptr compressed

    *)
  9. | X_1
    (*

    X ptr Windows

    *)
  10. | X_2
    (*

    X ptr Windows

    *)
  11. | X_3
    (*

    X ptr Windows

    *)
  12. | X_4
    (*

    X ptr Windows

    *)
  13. | SunRF
    (*

    Sun Raster file (RF)

    *)
  14. | GIF87
    (*

    Graphics Interchange Format ptr GIF87

    *)
  15. | GIF89
    (*

    Graphics Interchange Format ptr GIF89

    *)
  16. | MotifUIL
    (*

    Motif User Interface Language (UIL)

    *)
  17. | BMP
    (*

    Windows Bitmap (BMP)

    *)
  18. | JPEG
    (*

    JPEG image ptr file

    *)
  19. | PNG
    (*

    Portable Network Graphics file (PNG)

    *)
  20. | TIFF
    (*

    Tagged Image File Format (TIFF)

    *)
  21. | Gtk
    (*

    ptr Gtk

    *)
  22. | Wx
    (*

    ptr wxWidgets

    *)
  23. | Qt4
    (*

    ptr Qt4

    *)
  24. | SVG
    (*

    Scaleable Vector Graphics (SVG)

    *)
  25. | WMF
    (*

    Windows ptr Metafile

    *)
  26. | Quartz
    (*

    ptr Quartz

    *)
  27. | Sock
    (*

    Socket ptr driver

    *)
  28. | ZMQ
    (*

    0MQ ptr driver

    *)
  29. | OGL
    (*

    ptr OpenGL

    *)

Available workstation types, see also GR Workstation Types

val wid : int -> id
val open' : id -> string -> workstation_type -> unit

open' workstation_id connection type opens a graphical workstation.

Parameters

  • workstation_id: a workstation identifier
  • connection: a connection identifier
  • type: the desired workstation type
val close : id -> unit
val activate : id -> unit
val deactivate : id -> unit
val clear : unit -> unit
val update : unit -> unit
val set_window : float -> float -> float -> float -> unit

set_window xmin xmax ymin ymax sets the area of the NDC viewport that is to be drawn in the workstation window.

This function defines the rectangular area of the Normalized Device Coordinate space to be output to the device. By default, the workstation transformation will map the range [0,1] x [0,1] in NDC onto the largest square on the workstation’s display surface. The aspect ratio of the workstation window is maintained at 1 to 1.

Parameters

  • xmin: The left horizontal coordinate of the workstation window (0 <= xmin < xmax).
  • xmax: The right horizontal coordinate of the workstation window (xmin < xmax <= 1).
  • ymin: The bottom vertical coordinate of the workstation window (0 <= ymin < ymax).
  • ymax: The top vertical coordinate of the workstation window (ymin < ymax <= 1).
val set_viewport : float -> float -> float -> float -> unit

set_viewport xmin xmax ymin ymax defines the size of the workstation graphics window in meters.

This function places a workstation window on the display of the specified size in meters. This command allows the workstation window to be accurately sized for a display or hardcopy device, and is often useful for sizing graphs for desktop publishing applications.

Parameters

  • xmin: The left horizontal coordinate of the workstation window.
  • xmax: The right horizontal coordinate of the workstation window.
  • ymin: The bottom vertical coordinate of the workstation window.
  • ymax: The top vertical coordinate of the workstation window.
val copy_segment : segment -> unit
val redraw_segment : unit -> unit