Loading...
Searching...
No Matches
psdriver/driver.c
Go to the documentation of this file.
/****************************************************************************
*
* MODULE: PS driver
* AUTHOR(S): Glynn Clements <glynn@gclements.plus.com>
* COPYRIGHT: (C) 2007 Glynn Clements
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*****************************************************************************/
#include "psdriver.h"
const struct driver *PS_Driver(void)
{
static struct driver drv;
static int initialized;
if (initialized)
return &drv;
drv.name = "ps";
drv.Box = PS_Box;
drv.Erase = PS_Erase;
drv.Graph_set = PS_Graph_set;
drv.Graph_close = PS_Graph_close;
drv.Graph_get_file = PS_Graph_get_file;
drv.Line_width = PS_Line_width;
drv.Set_window = PS_Set_window;
drv.Begin_raster = PS_begin_raster;
drv.Raster = PS_raster;
drv.End_raster = PS_end_raster;
drv.Begin = PS_Begin;
drv.Move = PS_Move;
drv.Cont = PS_Cont;
drv.Close = PS_Close;
drv.Stroke = PS_Stroke;
drv.Fill = PS_Fill;
drv.Point = PS_Point;
drv.Color = PS_Color;
drv.Bitmap = PS_Bitmap;
drv.Text = NULL;
drv.Text_box = NULL;
drv.Set_font = NULL;
drv.Font_list = NULL;
drv.Font_info = NULL;
initialized = 1;
return &drv;
}
NULL
#define NULL
Definition ccmath.h:32
PS_Box
void PS_Box(double x1, double y1, double x2, double y2)
Definition psdriver/box.c:3
PS_Color
void PS_Color(int r, int g, int b)
Definition psdriver/color.c:4
PS_Stroke
void PS_Stroke(void)
Definition psdriver/draw.c:36
PS_Fill
void PS_Fill(void)
Definition psdriver/draw.c:41
PS_Close
void PS_Close(void)
Definition psdriver/draw.c:31
PS_Begin
void PS_Begin(void)
Definition psdriver/draw.c:16
PS_Point
void PS_Point(double x, double y)
Definition psdriver/draw.c:46
PS_Cont
void PS_Cont(double x, double y)
Definition psdriver/draw.c:26
PS_Move
void PS_Move(double x, double y)
Definition psdriver/draw.c:21
PS_Bitmap
void PS_Bitmap(int ncols, int nrows, int threshold, const unsigned char *buf)
Definition psdriver/draw_bitmap.c:3
PS_Driver
const struct driver * PS_Driver(void)
Definition psdriver/driver.c:21
PS_Erase
void PS_Erase(void)
Definition psdriver/erase.c:3
PS_Graph_close
void PS_Graph_close(void)
Definition psdriver/graph_close.c:9
PS_Graph_set
int PS_Graph_set(void)
Definition psdriver/graph_set.c:170
PS_Graph_get_file
const char * PS_Graph_get_file(void)
Get render file.
Definition psdriver/graph_set.c:228
PS_Line_width
void PS_Line_width(double width)
Definition psdriver/line_width.c:3
psdriver.h
PS_raster
int PS_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition psdriver/raster.c:29
PS_Set_window
void PS_Set_window(double, double, double, double)
Definition psdriver/set_window.c:21
PS_begin_raster
void PS_begin_raster(int, int[2][2], double[2][2])
Definition psdriver/raster.c:7
PS_end_raster
void PS_end_raster(void)
Definition psdriver/raster.c:59
driver
Definition driver.h:27
driver::Graph_close
void(* Graph_close)(void)
Definition driver.h:33
driver::Line_width
void(* Line_width)(double)
Definition driver.h:35
driver::Font_info
void(* Font_info)(char ***, int *)
Definition driver.h:55
driver::Text_box
void(* Text_box)(const char *, double *, double *, double *, double *)
Definition driver.h:52
driver::Point
void(* Point)(double, double)
Definition driver.h:47
driver::Fill
void(* Fill)(void)
Definition driver.h:46
driver::Graph_get_file
const char *(* Graph_get_file)(void)
Definition driver.h:34
driver::Erase
void(* Erase)(void)
Definition driver.h:31
driver::Raster
int(* Raster)(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Definition driver.h:38
driver::Stroke
void(* Stroke)(void)
Definition driver.h:45
driver::Begin
void(* Begin)(void)
Definition driver.h:41
driver::Font_list
void(* Font_list)(char ***, int *)
Definition driver.h:54
driver::End_raster
void(* End_raster)(void)
Definition driver.h:40
driver::Box
void(* Box)(double, double, double, double)
Definition driver.h:30
driver::Move
void(* Move)(double, double)
Definition driver.h:42
driver::Begin_raster
void(* Begin_raster)(int, int[2][2], double[2][2])
Definition driver.h:37
driver::name
char * name
Definition driver.h:28
driver::Close
void(* Close)(void)
Definition driver.h:44
driver::Set_window
void(* Set_window)(double, double, double, double)
Definition driver.h:36
driver::Graph_set
int(* Graph_set)(void)
Definition driver.h:32
driver::Set_font
void(* Set_font)(const char *)
Definition driver.h:53
driver::Text
void(* Text)(const char *)
Definition driver.h:51
driver::Cont
void(* Cont)(double, double)
Definition driver.h:43
driver::Color
void(* Color)(int, int, int)
Definition driver.h:49
driver::Bitmap
void(* Bitmap)(int, int, int, const unsigned char *)
Definition driver.h:50