リスト8


	/*文章開始*/
static	WORD	text_start(p, len)
struct	{
	RECT	view;
	RECT	draw;
	UWORD	h_unit;
	UWORD	v_unit;
	UWORD	lang;
	UWORD	bgpat;
} *p;
ULONG	len;
{
	if (len < sizeof(*p)) return -1; textrect="p-">view;	/*暫定的に、viewのみ使用する*/
	gfil_rec(gid0, textrect, getpat(p->bgpat), 0, G_STORE);
	
	text_x = textrect.c.left;
	text_y = textrect.c.top;
	txbasesize = 16;
	txratio_h = txratio_v = 0;
	set_fontspec();
	
	txpitch_c = 0x0108;		/*1/8文字あき*/
	txpattr_c = 1;
	txpitch_l = 0x0304;		/*1/2行あき*/
	txpattr_l = 1;
	
	gset_chc(gid0, 0x10000000L, -1L);	/*背景は透明*/
	return 0;
}

	/*文章終了*/
static	WORD	text_end(p, len)
BYTE	*p;		/*内容は空*/
ULONG	len;
{
	return 0;
}
...
WORD	drawtad()
...
		switch (segid) {
...
			case	0xffe1:	/*文章開始セグメント*/
				text_start(data, (ULONG)len);
				break;
			case	0xffe2:	/*文章終了セグメント*/
				text_end(data, (ULONG)len);
				break;

戻る

Copyright 1995-2005 Personal Media Corporation