class PdfColorstackWhatsitNode
- supers: WhatsitNode
From the pdfTeX manual:
\pdfcolorstack ⟨stack number⟩ ⟨stack action⟩ ⟨general text⟩
The command operates on the stack of a given number. If ⟨stack action⟩ is push
keyword, the
new value provided as ⟨general text⟩ is inserted into the top of the graphic stack and becomes
the current stack value. If followed by pop
, the top value is removed from the stack and the
new top value becomes the current. set
keyword replaces the current value with ⟨general text⟩
without changing the stack size. current
keyword instructs just to use the current stack value
without modifying the stack at all.
Example:
assert.node_type("whatsit", "pdf_colorstack", {
id = "whatsit (8)",
subtype = "pdf_colorstack (29)",
fields = {
"prev (-1)",
"next (0)",
"id (1)",
"subtype (2)",
"attr (3)",
"stack (4)",
"cmd (5)",
"data (6)",
},
})
Reference:
- Source file of the
LuaTeX
manual: pdftex-t.tex#L3954-L3980 Source: luatex-nodes.tex#L1097-L1107
😱 Types incomplete or incorrect? 🙏 Please contribute!
fields
PdfColorstackWhatsitNode.stack
The colorstack id number.
PdfColorstackWhatsitNode.command
The command to execute. ⟨stack action⟩ → set (0) | push (1) | pop (2) | current (3) texnodes.c#L3523-L3545
PdfColorstackWhatsitNode.data
General text that is placed on top of the stack, for example 1 0 0 rg 1 0 0 RG
. rg
only colors filled outlines while the stroke color is set with RG
. From the PDF Reference, fourth edition, 4.5.7 Color Operators Page 251: gray G
: Set the stroking color space to DeviceGray. gray
is a number between 0.0 (black) and 1.0 (white). gray g
: Same as G
, but for nonstroking operations. r g b RG
: Set the stroking color space to DeviceRGB. Each operand must be a number between 0.0 (minimum intensity) and 1.0 (maximum intensity). r g b rg
: same as RG
, but for nonstroking operations. c m y k K
: Set the stroking color space to DeviceCMYK. Each operand must be a number between 0.0 (zero concentration) and 1.0 (maximum concentration). c m y k k
: Same as K
, but for nonstroking operations.