Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/cmd/gs/src/zrop.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises.  All rights reserved.
2
 
3
  This software is provided AS-IS with no warranty, either express or
4
  implied.
5
 
6
  This software is distributed under license and may not be copied,
7
  modified or distributed except as expressly authorized under the terms
8
  of the license contained in the file LICENSE in this distribution.
9
 
10
  For more information about licensing, please refer to
11
  http://www.ghostscript.com/licensing/. For information on
12
  commercial licensing, go to http://www.artifex.com/licensing/ or
13
  contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14
  San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15
*/
16
 
17
/* $Id: zrop.c,v 1.4 2002/02/21 22:24:54 giles Exp $ */
18
/* RasterOp control operators */
19
#include "memory_.h"
20
#include "ghost.h"
21
#include "oper.h"
22
#include "gsrop.h"
23
#include "gsutil.h"
24
#include "gxdevice.h"
25
#include "idict.h"
26
#include "idparam.h"
27
#include "igstate.h"
28
#include "store.h"
29
 
30
/* <int8> .setrasterop - */
31
private int
32
zsetrasterop(i_ctx_t *i_ctx_p)
33
{
34
    os_ptr op = osp;
35
    int param;
36
    int code = int_param(op, 0xff, &param);
37
 
38
    if (code < 0)
39
	return code;
40
    gs_setrasterop(igs, (gs_rop3_t)param);
41
    pop(1);
42
    return 0;
43
}
44
 
45
/* - .currentrasterop <int8> */
46
private int
47
zcurrentrasterop(i_ctx_t *i_ctx_p)
48
{
49
    os_ptr op = osp;
50
 
51
    push(1);
52
    make_int(op, (int)gs_currentrasterop(igs));
53
    return 0;
54
}
55
 
56
/* <bool> .setsourcetransparent - */
57
private int
58
zsetsourcetransparent(i_ctx_t *i_ctx_p)
59
{
60
    os_ptr op = osp;
61
 
62
    check_type(*op, t_boolean);
63
    gs_setsourcetransparent(igs, op->value.boolval);
64
    pop(1);
65
    return 0;
66
}
67
 
68
/* - .currentsourcetransparent <bool> */
69
private int
70
zcurrentsourcetransparent(i_ctx_t *i_ctx_p)
71
{
72
    os_ptr op = osp;
73
 
74
    push(1);
75
    make_bool(op, gs_currentsourcetransparent(igs));
76
    return 0;
77
}
78
 
79
/* <bool> .settexturetransparent - */
80
private int
81
zsettexturetransparent(i_ctx_t *i_ctx_p)
82
{
83
    os_ptr op = osp;
84
 
85
    check_type(*op, t_boolean);
86
    gs_settexturetransparent(igs, op->value.boolval);
87
    pop(1);
88
    return 0;
89
}
90
 
91
/* - .currenttexturetransparent <bool> */
92
private int
93
zcurrenttexturetransparent(i_ctx_t *i_ctx_p)
94
{
95
    os_ptr op = osp;
96
 
97
    push(1);
98
    make_bool(op, gs_currenttexturetransparent(igs));
99
    return 0;
100
}
101
 
102
/* ------ Initialization procedure ------ */
103
 
104
const op_def zrop_op_defs[] =
105
{
106
    {"0.currentrasterop", zcurrentrasterop},
107
    {"0.currentsourcetransparent", zcurrentsourcetransparent},
108
    {"0.currenttexturetransparent", zcurrenttexturetransparent},
109
    {"1.setrasterop", zsetrasterop},
110
    {"1.setsourcetransparent", zsetsourcetransparent},
111
    {"1.settexturetransparent", zsettexturetransparent},
112
    op_def_end(0)
113
};