Graphviz 12.1.0~dev.20240716.0947
Loading...
Searching...
No Matches
gdtclft.c File Reference
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <tcl.h>
#include "gd.h"
Include dependency graph for gdtclft.c:

Go to the source code of this file.

Data Structures

struct  cmdDataOptions
 
struct  cmdImgOptions
 
struct  BuffSinkContext
 

Macros

#define IMGPTR(O)   (O->internalRep.otherValuePtr)
 

Typedefs

typedef int() GdDataFunction(Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
typedef int() GdImgFunction(Tcl_Interp *interp, gdImagePtr gdImg, int argc, const int args[])
 

Functions

static int tclGd_GetColor (Tcl_Interp *interp, Tcl_Obj *obj, int *color)
 
static int gdCmd (ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdCreateCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdDestroyCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdWriteCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdInterlaceCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdColorCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdColorNewCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorExactCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorClosestCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorResolveCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorFreeCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorTranspCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdColorGetCmd (Tcl_Interp *interp, gdImagePtr im, int argc, const int args[])
 
static int tclGdBrushCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdTileCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdStyleCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdSetCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdLineCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdRectCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdArcCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdPolygonCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdFillCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdCopyCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdGetCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdSizeCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
static int tclGdTextCmd (Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])
 
int Gdtclft_Init (Tcl_Interp *interp)
 
int Gdtclft_SafeInit (Tcl_Interp *interp)
 

Variables

static Tcl_UpdateStringProc GdPtrTypeUpdate
 
static Tcl_SetFromAnyProc GdPtrTypeSet
 
static Tcl_ObjType GdPtrType
 
Tcl_AppInitProc Gdtclft_Init
 
Tcl_AppInitProc Gdtclft_SafeInit
 
static GdDataFunction tclGdCreateCmd
 
static GdDataFunction tclGdDestroyCmd
 
static GdDataFunction tclGdWriteCmd
 
static GdDataFunction tclGdColorCmd
 
static GdDataFunction tclGdInterlaceCmd
 
static GdDataFunction tclGdSetCmd
 
static GdDataFunction tclGdLineCmd
 
static GdDataFunction tclGdRectCmd
 
static GdDataFunction tclGdArcCmd
 
static GdDataFunction tclGdFillCmd
 
static GdDataFunction tclGdSizeCmd
 
static GdDataFunction tclGdTextCmd
 
static GdDataFunction tclGdCopyCmd
 
static GdDataFunction tclGdGetCmd
 
static GdDataFunction tclGdWriteBufCmd
 
static GdDataFunction tclGdBrushCmd
 
static GdDataFunction tclGdStyleCmd
 
static GdDataFunction tclGdTileCmd
 
static GdDataFunction tclGdPolygonCmd
 
static GdImgFunction tclGdColorNewCmd
 
static GdImgFunction tclGdColorExactCmd
 
static GdImgFunction tclGdColorClosestCmd
 
static GdImgFunction tclGdColorResolveCmd
 
static GdImgFunction tclGdColorFreeCmd
 
static GdImgFunction tclGdColorTranspCmd
 
static GdImgFunction tclGdColorGetCmd
 
static cmdDataOptions subcmdVec []
 
static cmdImgOptions colorCmdVec []
 

Macro Definition Documentation

◆ IMGPTR

#define IMGPTR (   O)    (O->internalRep.otherValuePtr)

Definition at line 33 of file gdtclft.c.

Typedef Documentation

◆ GdDataFunction

typedef int() GdDataFunction(Tcl_Interp *interp, int argc, Tcl_Obj *CONST objv[])

Definition at line 38 of file gdtclft.c.

◆ GdImgFunction

typedef int() GdImgFunction(Tcl_Interp *interp, gdImagePtr gdImg, int argc, const int args[])

Definition at line 39 of file gdtclft.c.

Function Documentation

◆ gdCmd()

static int gdCmd ( ClientData  clientData,
Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 341 of file gdtclft.c.

References cmd, fname, GdPtrType, GdPtrTypeSet, cmdDataOptions::ishandle, cmdDataOptions::minargs, NULL, cmdDataOptions::subcmds, subcmdVec, and usage.

Referenced by Gdtclft_Init().

Here is the caller graph for this function:

◆ Gdtclft_Init()

int Gdtclft_Init ( Tcl_Interp *  interp)

Definition at line 1270 of file gdtclft.c.

References gdCmd(), and NULL.

Here is the call graph for this function:

◆ Gdtclft_SafeInit()

int Gdtclft_SafeInit ( Tcl_Interp *  interp)

Definition at line 1302 of file gdtclft.c.

References Gdtclft_Init.

◆ tclGd_GetColor()

static int tclGd_GetColor ( Tcl_Interp *  interp,
Tcl_Obj *  obj,
int *  color 
)
static

Definition at line 159 of file gdtclft.c.

References color().

Referenced by tclGdArcCmd(), tclGdFillCmd(), tclGdLineCmd(), tclGdPolygonCmd(), tclGdRectCmd(), tclGdSetCmd(), and tclGdTextCmd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tclGdArcCmd()

static int tclGdArcCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 975 of file gdtclft.c.

References cmd, color(), IMGPTR, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdBrushCmd()

static int tclGdBrushCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 813 of file gdtclft.c.

References IMGPTR.

◆ tclGdColorClosestCmd()

static int tclGdColorClosestCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 727 of file gdtclft.c.

References color().

Here is the call graph for this function:

◆ tclGdColorCmd()

static int tclGdColorCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

◆ tclGdColorExactCmd()

static int tclGdColorExactCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 715 of file gdtclft.c.

References color().

Here is the call graph for this function:

◆ tclGdColorFreeCmd()

static int tclGdColorFreeCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 751 of file gdtclft.c.

◆ tclGdColorGetCmd()

static int tclGdColorGetCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 776 of file gdtclft.c.

References NULL.

◆ tclGdColorNewCmd()

static int tclGdColorNewCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 703 of file gdtclft.c.

References color().

Here is the call graph for this function:

◆ tclGdColorResolveCmd()

static int tclGdColorResolveCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 739 of file gdtclft.c.

References color().

Here is the call graph for this function:

◆ tclGdColorTranspCmd()

static int tclGdColorTranspCmd ( Tcl_Interp *  interp,
gdImagePtr  im,
int  argc,
const int  args[] 
)
static

Definition at line 761 of file gdtclft.c.

References color().

Here is the call graph for this function:

◆ tclGdCopyCmd()

static int tclGdCopyCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1125 of file gdtclft.c.

References IMGPTR.

◆ tclGdCreateCmd()

static int tclGdCreateCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 398 of file gdtclft.c.

References cmd, GdPtrType, IMGPTR, and NULL.

◆ tclGdDestroyCmd()

static int tclGdDestroyCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 509 of file gdtclft.c.

References IMGPTR.

◆ tclGdFillCmd()

static int tclGdFillCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1096 of file gdtclft.c.

References color(), IMGPTR, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdGetCmd()

static int tclGdGetCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1164 of file gdtclft.c.

References color(), and IMGPTR.

Here is the call graph for this function:

◆ tclGdInterlaceCmd()

static int tclGdInterlaceCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 624 of file gdtclft.c.

References IMGPTR.

◆ tclGdLineCmd()

static int tclGdLineCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 912 of file gdtclft.c.

References color(), IMGPTR, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdPolygonCmd()

static int tclGdPolygonCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1030 of file gdtclft.c.

References cmd, color(), IMGPTR, NULL, out(), points, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdRectCmd()

static int tclGdRectCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 941 of file gdtclft.c.

References cmd, color(), IMGPTR, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdSetCmd()

static int tclGdSetCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 887 of file gdtclft.c.

References color(), IMGPTR, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdSizeCmd()

static int tclGdSizeCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1187 of file gdtclft.c.

References IMGPTR.

◆ tclGdStyleCmd()

static int tclGdStyleCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 850 of file gdtclft.c.

References IMGPTR, and NULL.

◆ tclGdTextCmd()

static int tclGdTextCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 1204 of file gdtclft.c.

References color(), error(), GdPtrType, GdPtrTypeSet, IMGPTR, len(), NULL, str, and tclGd_GetColor().

Here is the call graph for this function:

◆ tclGdTileCmd()

static int tclGdTileCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 831 of file gdtclft.c.

References IMGPTR.

◆ tclGdWriteCmd()

static int tclGdWriteCmd ( Tcl_Interp *  interp,
int  argc,
Tcl_Obj *CONST  objv[] 
)
static

Definition at line 524 of file gdtclft.c.

References cmd, fname, IMGPTR, and NULL.

Variable Documentation

◆ colorCmdVec

cmdImgOptions colorCmdVec[]
static
Initial value:
= {
{"new", tclGdColorNewCmd, 5, 5, "red green blue"},
{"exact", tclGdColorExactCmd, 5, 5, "red green blue"},
{"closest", tclGdColorClosestCmd, 5, 5, "red green blue"},
{"resolve", tclGdColorResolveCmd, 5, 5, "red green blue"},
{"free", tclGdColorFreeCmd, 3, 3, "color"},
{"transparent", tclGdColorTranspCmd, 2, 3, "?color?"},
{"get", tclGdColorGetCmd, 2, 3, "?color?"}
}
static GdImgFunction tclGdColorGetCmd
Definition gdtclft.c:49
static GdImgFunction tclGdColorTranspCmd
Definition gdtclft.c:49
static GdImgFunction tclGdColorResolveCmd
Definition gdtclft.c:48
static GdImgFunction tclGdColorNewCmd
Definition gdtclft.c:47
static GdImgFunction tclGdColorFreeCmd
Definition gdtclft.c:48
static GdImgFunction tclGdColorExactCmd
Definition gdtclft.c:47
static GdImgFunction tclGdColorClosestCmd
Definition gdtclft.c:48

Definition at line 146 of file gdtclft.c.

Referenced by tclGdColorCmd().

◆ GdPtrType

Tcl_ObjType GdPtrType
static
Initial value:
= {
.name = "gd",
.updateStringProc = GdPtrTypeUpdate,
.setFromAnyProc = GdPtrTypeSet
}
static Tcl_UpdateStringProc GdPtrTypeUpdate
Definition gdtclft.c:26
static Tcl_SetFromAnyProc GdPtrTypeSet
Definition gdtclft.c:27

Definition at line 28 of file gdtclft.c.

Referenced by gdCmd(), tclGdCreateCmd(), and tclGdTextCmd().

◆ GdPtrTypeSet

Tcl_SetFromAnyProc GdPtrTypeSet
static

Definition at line 27 of file gdtclft.c.

Referenced by gdCmd(), and tclGdTextCmd().

◆ GdPtrTypeUpdate

Tcl_UpdateStringProc GdPtrTypeUpdate
static

Definition at line 26 of file gdtclft.c.

◆ Gdtclft_Init

Tcl_AppInitProc Gdtclft_Init

Definition at line 36 of file gdtclft.c.

Referenced by Gdtclft_SafeInit(), and Tcldot_Init().

◆ Gdtclft_SafeInit

Tcl_AppInitProc Gdtclft_SafeInit

Definition at line 36 of file gdtclft.c.

◆ subcmdVec

cmdDataOptions subcmdVec[]
static

Definition at line 73 of file gdtclft.c.

Referenced by gdCmd().

◆ tclGdArcCmd

GdDataFunction tclGdArcCmd
static

Definition at line 43 of file gdtclft.c.

◆ tclGdBrushCmd

GdDataFunction tclGdBrushCmd
static

Definition at line 45 of file gdtclft.c.

◆ tclGdColorClosestCmd

GdImgFunction tclGdColorClosestCmd
static

Definition at line 48 of file gdtclft.c.

◆ tclGdColorCmd

GdDataFunction tclGdColorCmd
static

Definition at line 42 of file gdtclft.c.

◆ tclGdColorExactCmd

GdImgFunction tclGdColorExactCmd
static

Definition at line 47 of file gdtclft.c.

◆ tclGdColorFreeCmd

GdImgFunction tclGdColorFreeCmd
static

Definition at line 48 of file gdtclft.c.

◆ tclGdColorGetCmd

GdImgFunction tclGdColorGetCmd
static

Definition at line 49 of file gdtclft.c.

◆ tclGdColorNewCmd

GdImgFunction tclGdColorNewCmd
static

Definition at line 47 of file gdtclft.c.

◆ tclGdColorResolveCmd

GdImgFunction tclGdColorResolveCmd
static

Definition at line 48 of file gdtclft.c.

◆ tclGdColorTranspCmd

GdImgFunction tclGdColorTranspCmd
static

Definition at line 49 of file gdtclft.c.

◆ tclGdCopyCmd

GdDataFunction tclGdCopyCmd
static

Definition at line 44 of file gdtclft.c.

◆ tclGdCreateCmd

GdDataFunction tclGdCreateCmd
static

Definition at line 41 of file gdtclft.c.

◆ tclGdDestroyCmd

GdDataFunction tclGdDestroyCmd
static

Definition at line 41 of file gdtclft.c.

◆ tclGdFillCmd

GdDataFunction tclGdFillCmd
static

Definition at line 43 of file gdtclft.c.

◆ tclGdGetCmd

GdDataFunction tclGdGetCmd
static

Definition at line 44 of file gdtclft.c.

◆ tclGdInterlaceCmd

GdDataFunction tclGdInterlaceCmd
static

Definition at line 42 of file gdtclft.c.

◆ tclGdLineCmd

GdDataFunction tclGdLineCmd
static

Definition at line 42 of file gdtclft.c.

◆ tclGdPolygonCmd

GdDataFunction tclGdPolygonCmd
static

Definition at line 45 of file gdtclft.c.

◆ tclGdRectCmd

GdDataFunction tclGdRectCmd
static

Definition at line 43 of file gdtclft.c.

◆ tclGdSetCmd

GdDataFunction tclGdSetCmd
static

Definition at line 42 of file gdtclft.c.

◆ tclGdSizeCmd

GdDataFunction tclGdSizeCmd
static

Definition at line 43 of file gdtclft.c.

◆ tclGdStyleCmd

GdDataFunction tclGdStyleCmd
static

Definition at line 45 of file gdtclft.c.

◆ tclGdTextCmd

GdDataFunction tclGdTextCmd
static

Definition at line 44 of file gdtclft.c.

◆ tclGdTileCmd

GdDataFunction tclGdTileCmd
static

Definition at line 45 of file gdtclft.c.

◆ tclGdWriteBufCmd

GdDataFunction tclGdWriteBufCmd
static

Definition at line 44 of file gdtclft.c.

◆ tclGdWriteCmd

GdDataFunction tclGdWriteCmd
static

Definition at line 41 of file gdtclft.c.