OUTIF(3) — NEWS-OS Programmer’s Manual
NAME
outif − CDIF binary and pnenmonic format data output library
SYNOPSIS
#include <CDFF/cdif.h>
#include <CDFF/value.h> cc files ... −l outif
DESCRIPTION
The outif library is a function library for outputting CDIF source code (pnenmonics) or binary code from inside programs to special file pointers.
Function entries can be divided into three major categories.
(1) Control functions
These functions do not output the CDIF command.
------------------------------------------------------------------------
function nameparameter comments
========================================================================
if_Open(fp)FILE ∗fp Specifies the file pointer for output
Default is stdout
------------------------------------------------------------------------
if_On()Sets output to ON. Default is ON
------------------------------------------------------------------------
if_Off()Sets output to OFF.
------------------------------------------------------------------------
if_Source()Output is as a CDIF source file
Default is binary file output
------------------------------------------------------------------------
if_Binary()Output is as a CDIF binary file
------------------------------------------------------------------------
if_Settabs(s)char ∗s control tabs from the begining of
the line to CDIF command mnemonic
in CDIF source file output
------------------------------------------------------------------------
if_Comment(s)char ∗s Add comment lines in CDIF source
file output
------------------------------------------------------------------------
if_Setsyscode(s) char ∗s Set character code set in CDIF source
file output.
s="euc" specifies EUC and s="sjis" specifies
Shift-JIS for the character code set s=’\0’(NULL)
specifies that the code set depends on
environment variable LANG. Without
this function, character code set is Shift-JIS
------------------------------------------------------------------------
(2) CDIF Command functions
These functions output the CDIF command.
------------------------------------------------------------------------
function nameparametercomments
========================================================================
if_end()
------------------------------------------------------------------------
if_beginpage(orient,x,y)int orient,x,y orient:0=portrait
1=landscape
------------------------------------------------------------------------
if_transform(x,y)int x,yvalue of Bmu
------------------------------------------------------------------------
if_cliparea(x,y,w,h)int x,y,w,hvalue of Bmu
------------------------------------------------------------------------
if_resetclip()
------------------------------------------------------------------------
if_reset()
------------------------------------------------------------------------
if_push()
------------------------------------------------------------------------
if_pop()
------------------------------------------------------------------------
if_flush(n)int nn:No. of pages to print
------------------------------------------------------------------------
if_transparent(flag)int flagflag:0/1
------------------------------------------------------------------------
if_setbmu(bmu)int bmuDefault: 1200
------------------------------------------------------------------------
if_setbau(bau)int bauDefault: 1000
------------------------------------------------------------------------
if_sethscale(ratio)int ratioratio in 1000ths
------------------------------------------------------------------------
if_setvscale(ratio)int ratioration in 1000ths
------------------------------------------------------------------------
if_setcsize(bmu)int bmuvalue of Bmu
------------------------------------------------------------------------
if_sethpitch(pitch)int pitchvalue of Bmu
------------------------------------------------------------------------
if_setvpitch(pitch)int pitchvalue of Bmu
------------------------------------------------------------------------
if_setslant(alpha)int alphavalue of Bau
------------------------------------------------------------------------
if_setrotate(alpha)int alphavalue of Bau
------------------------------------------------------------------------
if_setcscale(h,v)int h,vratio in 1000ths
------------------------------------------------------------------------
if_setcolor(r,g,b)int r,g,b
------------------------------------------------------------------------
if_setlwidth(width)int widthvalue of Bmu
------------------------------------------------------------------------
if_setface1(face)int faceSee typeface(7)
------------------------------------------------------------------------
if_setface2(face)int faceSee typeface(7)
------------------------------------------------------------------------
if_setextface(face)int faceSee typeface(7)
------------------------------------------------------------------------
if_setirotate(alpha)int alphavalue of Bau
------------------------------------------------------------------------
if_setlcolor(r,g,b)int r,g,b
------------------------------------------------------------------------
------------------------------------------------------------------------
function nameparametercomments
========================================================================
if_setbcolor(r,g,b)int r,g,b
------------------------------------------------------------------------
if_setlinecap(scap,ecap)int scap,ecap linecap id
------------------------------------------------------------------------
if_setlinejoin(join)int joinjoin id
------------------------------------------------------------------------
if_setahpitch(pitch)int pitchvalue of Bmu
------------------------------------------------------------------------
if_setavpitch(pitch)int pitchvalue of Bmu
------------------------------------------------------------------------
if_setcattr(dopr,lid,int dopr,lid, See graphic_operation(7)
lw,fopr,fid)lw,fopr,fid
------------------------------------------------------------------------
if_setdattr(opr,lid)int opr,lidSee graphic_operation(7)
------------------------------------------------------------------------
if_setfattr(opr,lid)int opr,lidSee graphic_operation(7)
------------------------------------------------------------------------
if_setiattr(opr)int oprSee graphic_operation(7)
------------------------------------------------------------------------
if_setlinepat(lid,res,int lid,res,width
width,p)char ∗ppointer to real image
------------------------------------------------------------------------
if_setfillpat(fid,res,int fid,res,width,height
width,height,p)char ∗p pointer to real image
------------------------------------------------------------------------
if_setextdchar(face,code,int face,code,res,
res,width,height,p)width,height
char ∗ppointer to real image
------------------------------------------------------------------------
if_setextvchar(face,int face,code,res,bytes
code,res,bytes,p)char ∗p pointer to real image
------------------------------------------------------------------------
if_putchar1(code)int codeAscii
------------------------------------------------------------------------
if_putchar2(code)int codeJIS code
------------------------------------------------------------------------
if_putextchar(code)int codeEUC & 0x7f7f
------------------------------------------------------------------------
if_putlimage(xres,wdot,p)int xres,wdot xres:dot/inch
char ∗pp:actaul image
------------------------------------------------------------------------
if_putimage(sample,xres,int sample,xres, sample:bit/pixel
yres,wdot,hdot,p)yres,wdot,hdot
char ∗pp:actual image
------------------------------------------------------------------------
if_putclrimage(mode,sample,int mode,sample, sample:bit/pixel
xres,yres,wdot,hdot,p) xres,yres,wdot,hdot
char ∗pp:actual image
------------------------------------------------------------------------
------------------------------------------------------------------------
function nameparametercomments
========================================================================
if_putcmpimage(mode,sample,int mode,sample,xres, sample:bit/pixel
xres,yres,wdot,hdot,yres,wdot,hdot,byte
byte,p)char ∗pp:actual image
------------------------------------------------------------------------
if_imagecmap(numpalette,p)int numpalette sample:bit/pixel
char ∗pp:actual image
------------------------------------------------------------------------
if_imagegmap(numpalette,p)int numpalette sample:bit/pixel
char ∗pp:actual image
------------------------------------------------------------------------
if_movea(x,y)int x,yvalue of Bmu
------------------------------------------------------------------------
if_mover(dx,dy)int dx,dyvalue of Bmu
------------------------------------------------------------------------
if_moveha(x)int xvalue of Bmu
------------------------------------------------------------------------
if_movehr(dx)int dxvalue of Bmu
------------------------------------------------------------------------
if_moveva(y)int yvalue of Bmu
------------------------------------------------------------------------
if_movevr(dy)int dyvalue of Bmu
------------------------------------------------------------------------
if_dapoint(x,y)int x, yvalue of Bmu
------------------------------------------------------------------------
if_drpoint()
------------------------------------------------------------------------
if_dapolyline(n,pos)int nNo. of pos
s_pos pos[]elements is n+1
------------------------------------------------------------------------
if_drpolyline(n,pos)int nNo. of pos
s_pos pos[]elements is n
------------------------------------------------------------------------
if_darectangle(x0,y0,x1,y1)int x0,y0,x1,y1 value of Bmu
------------------------------------------------------------------------
if_drrectangle(dx,dy)int dx,dyvalue of Bmu
------------------------------------------------------------------------
if_daelliarc(mode,cx,cy,int mode,cx,cy, mode:0=arc/1=sector
dx,dy,sa,da,sl)dx,dy,sa,da,sl 2=segment
------------------------------------------------------------------------
if_drelliarc(mode,int mode,mode:0=arc/1=sector
dx,dy,sa,da,sl)dx,dy,sa,da,sl2=segment
------------------------------------------------------------------------
if_dabezier(x0,y0,x1,y1,int x0,y0,x1,y1, value of Bmu
x2,y2,x3,y3)x2,y2,x3,y3
------------------------------------------------------------------------
if_drbezier(dx1,dy1,dx2,dy2,int dx1,dy1, value of Bmu
dx3,dy3)dx2,dy2,dx3,dy3
------------------------------------------------------------------------
if_daspline(n,pos)int nNo. of pos
s_pos pos[]elements is n+1
------------------------------------------------------------------------
------------------------------------------------------------------------
function nameparametercomments
========================================================================
if_drspline(n,pos)int nNo. of pos
s_pos pos[]elements is n
------------------------------------------------------------------------
if_farectangle(x0,y0,x1,y1)int x0,y0,x1,y1 value of Bmu
------------------------------------------------------------------------
if_frrectangle(dx,dy)int dx, dyvalue of Bmu
------------------------------------------------------------------------
if_fapolygon(n,pos)int nNo. of pos
s_pos pos[]elements is n+1
------------------------------------------------------------------------
if_frpolygon(n,pos)int nNo. of pos
s_pos pos[]elements is n
------------------------------------------------------------------------
if_faelliarc(mode,cx,cy,lx,ly,int mode,cx,cy,lx, mode:0=ellipse/1=sector
deg,ddeg,slant)ly,deg,ddeg,slant 2=segment
------------------------------------------------------------------------
if_frelliarc(mode,lx,ly,int mode,lx,ly, mode:0=ellipse/1=sector
deg,ddeg,slant)deg,ddeg,slant 2=segment
------------------------------------------------------------------------
if_fgroup(n)int nn:No. of filling
group elements
------------------------------------------------------------------------
if_fgline(sx,sy,ex,ey)int sx,sy,ex,ey value of Bmu
------------------------------------------------------------------------
if_fgelliarc(mode,x,y,lx,ly,int mode,x,y,lx, mode:0=ellipse/1=sector
deg,ddeg,slant)ly,deg,ddeg,slant 2=segment
------------------------------------------------------------------------
if_fgbezier(x0,y0,x1,y1,int x0,y0,x1,y1, value of Bmu
x2,y2,x3,y3)x2,y2,x3,y3
------------------------------------------------------------------------
if_fgspline(n,pos)int nNo. of pos
s_pos pos[]elements is n+1
------------------------------------------------------------------------
if_devdepend(code,n,p)int code,nGenerates CDIF device
char ∗pdependent code(0x80−0x9f)
n:byte count
p:data pointer
------------------------------------------------------------------------
(3) Command Macro functions
Although these functions are not part of the CDIF command,
they are used so that calls can be made using simplified parameters.
------------------------------------------------------------------------
function nameparameter comments
========================================================================
if_daline(x0,y0,x1,y1) int x0,y0,x1,y1 if_dapolyline is actually called
------------------------------------------------------------------------
if_drline(dx,dy)int dx,dy if_drpolyline is actually called
------------------------------------------------------------------------
The following functions correspond to the functions
with same name without "_H".
These functions output only operands.
Data output should be done by if_byte() or if_pos().
------------------------------------------------------------------------
if_putimage_H(sample, int sample, Outputs only operands of
xres,yres,wdot,hdot) xres,yres, if_putimage()
wdot,hdot Output of image data is done
if_putlimage_H(sample,wdot) by if_byte(n,p)
------------------------------------------------------------------------
if_putclrimage_H(mode,sample, int mode,sample,
xres,yres,wdot,hdot) xres,yres, Output of image data is done
wdot,hdot by if_byte(n,p)
if_putcmpimage_H(mode,sample, int byte byte:compressed data byte count
,yres,wdot,hdot,byte)
------------------------------------------------------------------------
if_imagecmap_H(numpalette) int numpalette Data output is done
if_imagegmap_H(numpalette) by if_byte(n,p)
------------------------------------------------------------------------
if_dapopyline_H(n)int n Output of image data is done
if_drpopyline_H(n)by if_pos(n,pos)
if_daspline_H(n)
if_drspline_H(n)
if_fapolygon_H(n)
if_frpolygon_H(n)
if_fgspline_H(n)
------------------------------------------------------------------------
if_devdepend_H(code,n) int code,n Output of image data is done
by if_byte(n,p)
------------------------------------------------------------------------
if_byte(n,p)int n Output n byte binary data(image)
char ∗p
------------------------------------------------------------------------
if_pos(n,pos)int n Output n of position data
s_pos pos[]
------------------------------------------------------------------------
FILES
/usr/sony/include/CDFF/cdif.h
/usr/sony/include/CDFF/value.h
SEE ALSO
"CDIF Format Specification Manual" cdff(5), asif(1), linedash(7), graphic_operation(7), typeface(7)
NEWS-OSRelease 4.1C