PLplot  5.15.0
cd.c File Reference
#include <malloc.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "defines.h"
#include "cd.h"

Go to the source code of this file.

Functions

static int cdImageAddColor (cdImagePtr im, int si, int ei)
 
cdImagePtr cdImageCreate (int sx, int sy)
 
static int cdAppNull (unsigned char *es, int x)
 
static int cdAppByte (unsigned char *es, short int addme)
 
static int cdAppShort (unsigned char *es, short int addme)
 
static int cdcomhead (unsigned char *es, int elemclass, int id, int len)
 
static int cdcomheadlong (unsigned char *es, int elemclass, int id, int len)
 
static int cdAddElem (cdImagePtr im, unsigned char *es, int octet_count)
 
int cdCgmHeader (cdImagePtr im)
 
int cdCgmPic (cdImagePtr im, int sticky)
 
int cdCgmNewPic (cdImagePtr im, int sticky)
 
int cdImageCgm (cdImagePtr im, FILE *out)
 
int cdSetLineType (cdImagePtr im, int lntype)
 
int cdSetLineWidth (cdImagePtr im, int lnwidth)
 
int cdSetLineColor (cdImagePtr im, int lncolor)
 
int cdSetFillStyle (cdImagePtr im, int instyle)
 
int cdSetFillColor (cdImagePtr im, int incolor)
 
int cdSetFillHatch (cdImagePtr im, int inhatch)
 
int cdSetEdgeType (cdImagePtr im, int edtype)
 
int cdSetEdgeWidth (cdImagePtr im, int edwidth)
 
int cdSetEdgeColor (cdImagePtr im, int edcolor)
 
int cdSetEdgeVis (cdImagePtr im, int edvis)
 
int cdSetTextFont (cdImagePtr im, int font)
 
int cdSetTextColor (cdImagePtr im, int color)
 
int cdSetTextHeight (cdImagePtr im, int height)
 
int cdSetTextPath (cdImagePtr im, int tpath)
 
int cdSetTextOrient (cdImagePtr im, int xup, int yup, int xbase, int ybase)
 
int cdSetMarkerType (cdImagePtr im, int mtype)
 
int cdSetMarkerSize (cdImagePtr im, int msize)
 
int cdSetMarkerColor (cdImagePtr im, int mcolor)
 
int cdSetLineAttrib (cdImagePtr im, int lntype, int lnwidth, int lncolor)
 
int cdSetShapeFillAttrib (cdImagePtr im, int instyle, int incolor, int inhatch)
 
int cdSetShapeEdgeAttrib (cdImagePtr im, int edtype, int edwidth, int edcolor, int edvis)
 
int cdSetTextAttrib (cdImagePtr im, int font, int color, int height)
 
int cdSetMarkerAttrib (cdImagePtr im, int mtype, int msize, int mcolor)
 
int cdImageDestroy (cdImagePtr im)
 
int cdImageColorClosest (cdImagePtr im, int r, int g, int b)
 
int cdImageColorClear (cdImagePtr im)
 
int cdImageColorExact (cdImagePtr im, int r, int g, int b)
 
static int cdImageAddColorIndex (cdImagePtr im, int r, int g, int b)
 
int cdImageColorAllocate (cdImagePtr im, int r, int g, int b)
 
int cdImageColor16 (cdImagePtr im)
 
int cdImageColorDeallocate (cdImagePtr im, int color)
 
int cdLine (cdImagePtr im, int x1, int y1, int x2, int y2)
 
int cdMarker (cdImagePtr im, int x, int y)
 
int cdRectangle (cdImagePtr im, int x1, int y1, int x2, int y2)
 
int cdCircle (cdImagePtr im, int cx, int cy, int r)
 
int cdArc3Pt (cdImagePtr im, int sx, int sy, int ix, int iy, int ex, int ey)
 
int cdArc3PtClose (cdImagePtr im, int sx, int sy, int ix, int iy, int ex, int ey, int cl)
 
int cdEllipse (cdImagePtr im, int cx, int cy, int d1x, int d1y, int d2x, int d2y)
 
int cdPolygon (cdImagePtr im, cdPointPtr p, int n)
 
int cdPolygonSet (cdImagePtr im, cdPointPtr p, int n)
 
int cdPolyLine (cdImagePtr im, cdPointPtr p, int n)
 
int cdPolyMarker (cdImagePtr im, cdPointPtr p, int n)
 
int cdText (cdImagePtr im, int x, int y, const char *ts)
 
int cdImageLine (cdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
int cdImageDashedLine (cdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
int cdImageBoundsSafe (cdImagePtr im, int x, int y)
 
int cdImageRectangle (cdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
int cdImageSetSize (cdImagePtr im, int x, int y)
 
int cdImageSetLineSpec (cdImagePtr im, int specmode)
 
int cdImageSetMarkerSpec (cdImagePtr im, int specmode)
 
int cdImageSetEdgeSpec (cdImagePtr im, int specmode)
 
int cdImageSetOutput (cdImagePtr im, FILE *output)
 
int cdImageAddFont (cdImagePtr im, const char *fontname)
 
int cdImageClearFonts (cdImagePtr im)
 
int cdImageSetDefaults (cdImagePtr im)
 
cdImagePtr cdImageStartCgm ()
 
int cdImageEndPic (cdImagePtr im)
 
int cdImageEndCgm (cdImagePtr im)
 

Function Documentation

◆ cdAddElem()

static int cdAddElem ( cdImagePtr  im,
unsigned char *  es,
int  octet_count 
)
static

Definition at line 173 of file cd.c.

◆ cdAppByte()

static int cdAppByte ( unsigned char *  es,
short int  addme 
)
static

Definition at line 75 of file cd.c.

◆ cdAppNull()

static int cdAppNull ( unsigned char *  es,
int  x 
)
static

Definition at line 61 of file cd.c.

◆ cdAppShort()

static int cdAppShort ( unsigned char *  es,
short int  addme 
)
static

Definition at line 85 of file cd.c.

◆ cdArc3Pt()

int cdArc3Pt ( cdImagePtr  im,
int  sx,
int  sy,
int  ix,
int  iy,
int  ex,
int  ey 
)

Definition at line 2376 of file cd.c.

◆ cdArc3PtClose()

int cdArc3PtClose ( cdImagePtr  im,
int  sx,
int  sy,
int  ix,
int  iy,
int  ex,
int  ey,
int  cl 
)

Definition at line 2458 of file cd.c.

◆ cdCgmHeader()

int cdCgmHeader ( cdImagePtr  im)

Definition at line 214 of file cd.c.

◆ cdCgmNewPic()

int cdCgmNewPic ( cdImagePtr  im,
int  sticky 
)

Definition at line 542 of file cd.c.

◆ cdCgmPic()

int cdCgmPic ( cdImagePtr  im,
int  sticky 
)

Definition at line 365 of file cd.c.

◆ cdCircle()

int cdCircle ( cdImagePtr  im,
int  cx,
int  cy,
int  r 
)

Definition at line 2309 of file cd.c.

◆ cdcomhead()

static int cdcomhead ( unsigned char *  es,
int  elemclass,
int  id,
int  len 
)
static

Definition at line 122 of file cd.c.

◆ cdcomheadlong()

static int cdcomheadlong ( unsigned char *  es,
int  elemclass,
int  id,
int  len 
)
static

Definition at line 148 of file cd.c.

◆ cdEllipse()

int cdEllipse ( cdImagePtr  im,
int  cx,
int  cy,
int  d1x,
int  d1y,
int  d2x,
int  d2y 
)

Definition at line 2524 of file cd.c.

◆ cdImageAddColor()

static int cdImageAddColor ( cdImagePtr  im,
int  si,
int  ei 
)
static

Definition at line 1881 of file cd.c.

◆ cdImageAddColorIndex()

static int cdImageAddColorIndex ( cdImagePtr  im,
int  r,
int  g,
int  b 
)
static

Definition at line 1848 of file cd.c.

◆ cdImageAddFont()

int cdImageAddFont ( cdImagePtr  im,
const char *  fontname 
)

Definition at line 3163 of file cd.c.

◆ cdImageBoundsSafe()

int cdImageBoundsSafe ( cdImagePtr  im,
int  x,
int  y 
)

Definition at line 3073 of file cd.c.

◆ cdImageCgm()

int cdImageCgm ( cdImagePtr  im,
FILE *  out 
)

Definition at line 560 of file cd.c.

◆ cdImageClearFonts()

int cdImageClearFonts ( cdImagePtr  im)

Definition at line 3198 of file cd.c.

◆ cdImageColor16()

int cdImageColor16 ( cdImagePtr  im)

Definition at line 1989 of file cd.c.

◆ cdImageColorAllocate()

int cdImageColorAllocate ( cdImagePtr  im,
int  r,
int  g,
int  b 
)

Definition at line 1966 of file cd.c.

◆ cdImageColorClear()

int cdImageColorClear ( cdImagePtr  im)

Definition at line 1815 of file cd.c.

◆ cdImageColorClosest()

int cdImageColorClosest ( cdImagePtr  im,
int  r,
int  g,
int  b 
)

Definition at line 1786 of file cd.c.

◆ cdImageColorDeallocate()

int cdImageColorDeallocate ( cdImagePtr  im,
int  color 
)

Definition at line 2104 of file cd.c.

◆ cdImageColorExact()

int cdImageColorExact ( cdImagePtr  im,
int  r,
int  g,
int  b 
)

Definition at line 1826 of file cd.c.

◆ cdImageCreate()

cdImagePtr cdImageCreate ( int  sx,
int  sy 
)

Definition at line 31 of file cd.c.

◆ cdImageDashedLine()

int cdImageDashedLine ( cdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 3056 of file cd.c.

◆ cdImageDestroy()

int cdImageDestroy ( cdImagePtr  im)

Definition at line 1766 of file cd.c.

◆ cdImageEndCgm()

int cdImageEndCgm ( cdImagePtr  im)

Definition at line 3337 of file cd.c.

◆ cdImageEndPic()

int cdImageEndPic ( cdImagePtr  im)

Definition at line 3300 of file cd.c.

◆ cdImageLine()

int cdImageLine ( cdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 3034 of file cd.c.

◆ cdImageRectangle()

int cdImageRectangle ( cdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 3082 of file cd.c.

◆ cdImageSetDefaults()

int cdImageSetDefaults ( cdImagePtr  im)

Definition at line 3209 of file cd.c.

◆ cdImageSetEdgeSpec()

int cdImageSetEdgeSpec ( cdImagePtr  im,
int  specmode 
)

Definition at line 3134 of file cd.c.

◆ cdImageSetLineSpec()

int cdImageSetLineSpec ( cdImagePtr  im,
int  specmode 
)

Definition at line 3112 of file cd.c.

◆ cdImageSetMarkerSpec()

int cdImageSetMarkerSpec ( cdImagePtr  im,
int  specmode 
)

Definition at line 3123 of file cd.c.

◆ cdImageSetOutput()

int cdImageSetOutput ( cdImagePtr  im,
FILE *  output 
)

Definition at line 3145 of file cd.c.

◆ cdImageSetSize()

int cdImageSetSize ( cdImagePtr  im,
int  x,
int  y 
)

Definition at line 3104 of file cd.c.

◆ cdImageStartCgm()

cdImagePtr cdImageStartCgm ( )

Definition at line 3246 of file cd.c.

◆ cdLine()

int cdLine ( cdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 2116 of file cd.c.

◆ cdMarker()

int cdMarker ( cdImagePtr  im,
int  x,
int  y 
)

Definition at line 2188 of file cd.c.

◆ cdPolygon()

int cdPolygon ( cdImagePtr  im,
cdPointPtr  p,
int  n 
)

Definition at line 2581 of file cd.c.

◆ cdPolygonSet()

int cdPolygonSet ( cdImagePtr  im,
cdPointPtr  p,
int  n 
)

Definition at line 2675 of file cd.c.

◆ cdPolyLine()

int cdPolyLine ( cdImagePtr  im,
cdPointPtr  p,
int  n 
)

Definition at line 2772 of file cd.c.

◆ cdPolyMarker()

int cdPolyMarker ( cdImagePtr  im,
cdPointPtr  p,
int  n 
)

Definition at line 2859 of file cd.c.

◆ cdRectangle()

int cdRectangle ( cdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 2235 of file cd.c.

◆ cdSetEdgeColor()

int cdSetEdgeColor ( cdImagePtr  im,
int  edcolor 
)

Definition at line 1080 of file cd.c.

◆ cdSetEdgeType()

int cdSetEdgeType ( cdImagePtr  im,
int  edtype 
)

Definition at line 947 of file cd.c.

◆ cdSetEdgeVis()

int cdSetEdgeVis ( cdImagePtr  im,
int  edvis 
)

Definition at line 1137 of file cd.c.

◆ cdSetEdgeWidth()

int cdSetEdgeWidth ( cdImagePtr  im,
int  edwidth 
)

Definition at line 1010 of file cd.c.

◆ cdSetFillColor()

int cdSetFillColor ( cdImagePtr  im,
int  incolor 
)

Definition at line 822 of file cd.c.

◆ cdSetFillHatch()

int cdSetFillHatch ( cdImagePtr  im,
int  inhatch 
)

Definition at line 880 of file cd.c.

◆ cdSetFillStyle()

int cdSetFillStyle ( cdImagePtr  im,
int  instyle 
)

Definition at line 761 of file cd.c.

◆ cdSetLineAttrib()

int cdSetLineAttrib ( cdImagePtr  im,
int  lntype,
int  lnwidth,
int  lncolor 
)

Definition at line 1652 of file cd.c.

◆ cdSetLineColor()

int cdSetLineColor ( cdImagePtr  im,
int  lncolor 
)

Definition at line 703 of file cd.c.

◆ cdSetLineType()

int cdSetLineType ( cdImagePtr  im,
int  lntype 
)

Definition at line 574 of file cd.c.

◆ cdSetLineWidth()

int cdSetLineWidth ( cdImagePtr  im,
int  lnwidth 
)

Definition at line 631 of file cd.c.

◆ cdSetMarkerAttrib()

int cdSetMarkerAttrib ( cdImagePtr  im,
int  mtype,
int  msize,
int  mcolor 
)

Definition at line 1750 of file cd.c.

◆ cdSetMarkerColor()

int cdSetMarkerColor ( cdImagePtr  im,
int  mcolor 
)

Definition at line 1594 of file cd.c.

◆ cdSetMarkerSize()

int cdSetMarkerSize ( cdImagePtr  im,
int  msize 
)

Definition at line 1522 of file cd.c.

◆ cdSetMarkerType()

int cdSetMarkerType ( cdImagePtr  im,
int  mtype 
)

Definition at line 1465 of file cd.c.

◆ cdSetShapeEdgeAttrib()

int cdSetShapeEdgeAttrib ( cdImagePtr  im,
int  edtype,
int  edwidth,
int  edcolor,
int  edvis 
)

Definition at line 1693 of file cd.c.

◆ cdSetShapeFillAttrib()

int cdSetShapeFillAttrib ( cdImagePtr  im,
int  instyle,
int  incolor,
int  inhatch 
)

Definition at line 1668 of file cd.c.

◆ cdSetTextAttrib()

int cdSetTextAttrib ( cdImagePtr  im,
int  font,
int  color,
int  height 
)

Definition at line 1720 of file cd.c.

◆ cdSetTextColor()

int cdSetTextColor ( cdImagePtr  im,
int  color 
)

Definition at line 1257 of file cd.c.

◆ cdSetTextFont()

int cdSetTextFont ( cdImagePtr  im,
int  font 
)

Definition at line 1192 of file cd.c.

◆ cdSetTextHeight()

int cdSetTextHeight ( cdImagePtr  im,
int  height 
)

Definition at line 1311 of file cd.c.

◆ cdSetTextOrient()

int cdSetTextOrient ( cdImagePtr  im,
int  xup,
int  yup,
int  xbase,
int  ybase 
)

Definition at line 1409 of file cd.c.

◆ cdSetTextPath()

int cdSetTextPath ( cdImagePtr  im,
int  tpath 
)

Definition at line 1357 of file cd.c.

◆ cdText()

int cdText ( cdImagePtr  im,
int  x,
int  y,
const char *  ts 
)

Definition at line 2945 of file cd.c.