58 lines
1.3 KiB
PostScript
58 lines
1.3 KiB
PostScript
/background-create {
|
|
<<
|
|
/color 0 0 0 0 color-create
|
|
/image /null background-image-create
|
|
/position <<
|
|
/x <<
|
|
/percentage false
|
|
/value 0
|
|
>>
|
|
/y <<
|
|
/percentage false
|
|
/value 0
|
|
>>
|
|
>>
|
|
/repeat /repeat
|
|
>>
|
|
} def
|
|
|
|
/background-get-color {
|
|
/color get
|
|
} def
|
|
|
|
/background-get-image {
|
|
/image get
|
|
} def
|
|
|
|
/background-get-position {
|
|
/position get
|
|
} def
|
|
|
|
/background-get-repeat {
|
|
/repeat get
|
|
} def
|
|
|
|
/background-show { % => Box Viewport This
|
|
dup background-get-color % => Box Viewport This BackgroundColor
|
|
color-is-transparent not { % => Box Viewport This
|
|
dup background-get-color
|
|
color-apply
|
|
|
|
2 index get-left-padding
|
|
3 index get-bottom-padding
|
|
4 index get-right-padding
|
|
5 index get-left-padding sub
|
|
5 index get-top-padding
|
|
6 index get-bottom-padding sub
|
|
rectfill
|
|
} if % => Box Viewport This
|
|
|
|
dup background-get-position
|
|
1 index background-get-repeat % => Box Viewport This Position Repeat
|
|
4 index % => Box Viewport This Position Repeat Box
|
|
4 index % => Box Viewport This Position Repeat Box Viewport
|
|
4 index background-get-image
|
|
background-image-show % => Box Viewport This
|
|
|
|
pop pop pop
|
|
} def |