OUTIF(3) — NEWS-OS Programmer’s Manual
名称
outif − CDIF バイナリおよびニーモニック形式データ出力ライブラリ
形式
#include <CDFF/cdif.h>
#include <CDFF/value.h> cc files ... −l outif
解説
Outif library は、プログラム中から CDIF のソースコード(ニーモニック)もしくは バイナリコードを特定の File Pointer へ出力する fucntion library です。
function entryは大別して 3 つに分けられます。
(1) Control function
これらの function は CDIF のコマンドを出力する function ではありません。
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_Open(fp)FILE ∗fp 出力する File Pointer を指定する
デフォルトは stdout
──────────────────────────────────
if_On()出力を ON にする。デフォルトでは ON
──────────────────────────────────
if_Off()出力を OFF にする
──────────────────────────────────
if_Source()出力を CDIF Source で出力する
デフォルトは Binary
──────────────────────────────────
if_Binary()出力を CDIF Binary で出力する
──────────────────────────────────
if_Settabs(s)char ∗s 出力を CDIF Source で出力する際、
行頭からコマンドニーモニックまでの
TABのコントロールをする
──────────────────────────────────
if_Comment(s)char ∗s 出力を CDIF Source で出力する際、
コメント行を追加する
──────────────────────────────────
if_Setsyscode(s) char ∗s 出力を CDIF Source で出力する際の
文字コードセットを指定する
s="euc"ならEUC、s="sjis"ならシフトJIS
s=’\0’なら環境変数 LANG により決定
デフォルトはシフトJIS
──────────────────────────────────
(2) CDIF Command function
これらの function は CDIF のコマンドを出力する function です。
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_end()
──────────────────────────────────
if_beginpage(orient,x,y) int orient,x,y orient:0=portrait
1=landscape
──────────────────────────────────
if_transform(x,y)int x,y Bmu 値
──────────────────────────────────
if_cliparea(x,y,w,h)int x,y,w,h Bmu 値
──────────────────────────────────
if_resetclip()
──────────────────────────────────
if_reset()
──────────────────────────────────
if_push()
──────────────────────────────────
if_pop()
──────────────────────────────────
if_flush(n)int n n:印刷枚数
──────────────────────────────────
if_transparent(flag)int flag flag:0/1
──────────────────────────────────
if_setbmu(bmu)int bmu デフォルト:1200
──────────────────────────────────
if_setbau(bau)int bau デフォルト:1000
──────────────────────────────────
if_sethscale(ratio)int ratio 千分率
──────────────────────────────────
if_setvscale(ratio)int ratio 千分率
──────────────────────────────────
if_setcsize(bmu)int bmu Bmu 値
──────────────────────────────────
if_sethpitch(pitch)int pitch Bmu 値
──────────────────────────────────
if_setvpitch(pitch)int pitch Bmu 値
──────────────────────────────────
if_setslant(alpha)int alpha Bau 値
──────────────────────────────────
if_setrotate(alpha)int alpha Bau 値
──────────────────────────────────
if_setcscale(h,v)int h,v 千分率
──────────────────────────────────
if_setcolor(r,g,b)int r,g,b
──────────────────────────────────
if_setlwidth(width)int width Bmu 値
──────────────────────────────────
if_setface1(face)int face typeface(7)参照
──────────────────────────────────
if_setface2(face)int face typeface(7)参照
──────────────────────────────────
if_setextface(face)int face typeface(7)参照
──────────────────────────────────
if_setirotate(alpha)int alpha Bau 値
──────────────────────────────────
if_setlcolor(r,g,b)int r,g,b
──────────────────────────────────
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_setbcolor(r,g,b)int r,g,b
──────────────────────────────────
if_setlinecap(scap,ecap) int scap,ecap linecap id
──────────────────────────────────
if_setlinejoin(join)int join join id
──────────────────────────────────
if_setahpitch(pitch)int pitch Bmu 値
──────────────────────────────────
if_setavpitch(pitch)int pitch Bmu 値
──────────────────────────────────
if_setcattr(dopr,lid, int dopr,lid, graphic_operation(7)
lw,fopr,fid) lw,fopr,fid 参照
──────────────────────────────────
if_setdattr(opr,lid)int opr,lid graphic_operation(7)
参照
──────────────────────────────────
if_setfattr(opr,lid)int opr,lid graphic_operation(7)
参照
──────────────────────────────────
if_setiattr(opr)int opr graphic_operation(7)
参照
──────────────────────────────────
if_setlinepat(lid,res, int lid,res,width
width,p)char ∗p image実体へのpointer
──────────────────────────────────
if_setfillpat(fid,res, int fid,res,width,height
width,height,p) char ∗p image実体へのpointer
──────────────────────────────────
if_setextdchar(face,code, int face,code,res,
res,width,height,p) width,height
char ∗p image実体へのpointer
──────────────────────────────────
if_setextvchar(face,int face,code,bytes
code,bytes,p) char ∗p image実体へのpointer
──────────────────────────────────
if_putchar1(code)int code Ascii
──────────────────────────────────
if_putchar2(code)int code JIS code
──────────────────────────────────
if_putextchar(code)int code EUC & 0x7f7f
──────────────────────────────────
if_putlimage(xres,width,p) int xres,width xres:dot/inch
char ∗p p:actaul image
──────────────────────────────────
if_putimage(sample,xres, int sample,xres, sample:bit/pixel
yres,wdot,hdot,p) yres,wdot,hdot
char ∗p p:actual image
──────────────────────────────────
if_putclrimage(mode,sample, int mode,sample, sample:bit/pixel
xres,yres,wdot,hdot,p) xres,yres,wdot,hdot
char ∗p p:actual image
──────────────────────────────────
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_putcmpimage(mode,sample, int mode,sample,xres, sample:bit/pixel
xres,yres,wdot,hdot, yres,wdot,hdot,byte
byte,p)char ∗p p:actual image
──────────────────────────────────
if_imagecmap(numpalette,p), int numpalette sample:bit/pixel
char ∗p p:actual image
──────────────────────────────────
if_imagegmap(numpalette,p), int numpalette sample:bit/pixel
char ∗p p:actual image
──────────────────────────────────
if_movea(x,y)int x,y Bmu 値
──────────────────────────────────
if_mover(dx,dy)int dx,dy Bmu 値
──────────────────────────────────
if_moveha(x)int x Bmu 値
──────────────────────────────────
if_movehr(dx)int dx Bmu 値
──────────────────────────────────
if_moveva(y)int y Bmu 値
──────────────────────────────────
if_movevr(dy)int dy Bmu 値
──────────────────────────────────
if_dapoint(x,y)int x, y Bmu 値
──────────────────────────────────
if_drpoint()
──────────────────────────────────
if_dapolyline(n,pos)int n
s_pos pos[] posの要素数は n+1
──────────────────────────────────
if_drpolyline(n,pos)int n
s_pos pos[] posの要素数は n
──────────────────────────────────
if_darectangle(x0,y0,x1,y1) int x0,y0,x1,y1 Bmu 値
──────────────────────────────────
if_drrectangle(lx,ly)int lx,ly Bmu 値
──────────────────────────────────
if_daelliarc(mode,xc,yc, int mode,xc,yc, mode:0=円弧/1=扇形
lx,ly,sa,da,sl) lx,ly,sa,da,sl 2=弓形
──────────────────────────────────
if_drelliarc(mode, int mode, mode:0=円弧/1=扇形
lx,ly,sa,da,sl) lx,ly,sa,da,sl 2:弓形
──────────────────────────────────
if_dabezier(x0,y0,x1,y1, int x0,y0,x1,y1, Bmu 値
x2,y2,x3,y3)x2,y2,x3,y3
──────────────────────────────────
if_drbezier(dx1,dy1,dx2,dy2, int dx1,dy1, Bmu 値
dx3,dy3)dx2,dy2,dx3,dy3
──────────────────────────────────
if_daspline(n,pos)int n
s_pos pos[] posの要素数は n+1
──────────────────────────────────
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_drspline(n,pos)int n
s_pos pos[] posの要素数は n
──────────────────────────────────
if_farectangle(x0,y0,x1,y1) int x0,y0,x1,y1 Bmu 値
──────────────────────────────────
if_frrectangle(lx,ly)int lx, ly Bmu 値
──────────────────────────────────
if_fapolygon(n,pos)int n
s_pos pos[] posの要素数は n+1
──────────────────────────────────
if_frpolygon(n,pos)int n
s_pos pos[] posの要素数は n
──────────────────────────────────
if_faelliarc(mode,cx,cy,lx,ly, int mode,cx,cy,lx, mode:0=楕円/1=扇形
deg,ddeg,slant) ly,deg,ddeg,slant 2=弓形
──────────────────────────────────
if_frelliarc(mode,lx,ly, int mode,lx,ly, mode:0=楕円/1=扇形
deg,ddeg,slant) deg,ddeg,slant 2=弓形
──────────────────────────────────
if_fgroup(n)int n n:fillng group要素数
──────────────────────────────────
if_fgline(x0,y0,x1,y2)int x0,y0,x1,y1 Bmu 値
──────────────────────────────────
if_fgelliarc(mode,cx,cy,lx,ly, int mode,cx,cy,lx, mode:0=楕円/1=扇形
deg,ddeg,slant) ly,deg,ddeg,slant 2=弓形
──────────────────────────────────
if_fgbezier(x0,y0,x1,y1, int x0,y0,x1,y1, Bmu 値
x2,y2,x3,y3)x2,y2,x3,y3
──────────────────────────────────
if_fgspline(n,pos)int n
s_pos pos[] posの要素数は n+1
──────────────────────────────────
if_devdepend(code,n,p)int code,n CDIFデバイス依存コード
char ∗p (0x80〜0xff)の生成
n:データバイト数
p:データポインタ
──────────────────────────────────
(3) Command Macro function
CDIF の command にはないが簡素化した parameter で call できるよう
にしたfunctionです。
──────────────────────────────────
function nameparameter comments
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
if_daline(x0,y0,x1,y1) x0,y0,x1,y1 実際にはif_dapolylineをcallする
──────────────────────────────────
if_drline(dx,dy)dx,dy 実際にはif_drpolylineをcallする
──────────────────────────────────
以下に列挙するfunctionは、
"_H"を省いたfunctionに対応して
オペランドのみを出力する
──────────────────────────────────
if_putimage_H(sample, int sample, 実際にはif_putimage()のオ
xres,yres,wdot,hdot) xres,yres, ペランドのみを出力する
wdot,hdot Imageの実体はif_byte(n,p)
if_putlimage_H(sample,wdot) で出力する
──────────────────────────────────
if_putclrimage_H(mode,sample, int mode,sample
xres,yres,wdot,hdot) xres,yres
wdot,hdot Imageの実体はif_byte(n,p)
if_putcmpimage_H(mode,sample, int byte byte:圧縮データバイト数
xres,yres,wdot,hdot,byte)
──────────────────────────────────
if_imagecmap_H(numpalette) int numpalette 実体はif_byte(n,p)で
if_imagegmap_H(numpalette) 出力する
──────────────────────────────────
if_dapolyline_H(n)int n データ実体はif_pos(n,pos)
if_drpolyline_H(n)で出力する
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 データ実体はif_byte(n,p)
で出力する
──────────────────────────────────
if_byte(n,p)int n nバイトのbinary data(image)
char ∗p を出力する
──────────────────────────────────
if_pos(n,pos)int n n個のposition data
s_pos pos[] を出力する
──────────────────────────────────
関連ファイル
/usr/sony/include/CDFF/cdif.h
/usr/sony/include/CDFF/value.h
関連事項
『CDIF フォーマット仕様書』
cdff(5), asif(1), linedash(7), graphic_operation(7), typeface(7)
NEWS-OSRelease 4.1C