source pkgsNeeded.tcl

ui_init "t_state.tcl"
SetFileTypes

PH "Image mode commands and constants" 

PN "info tclversion: " ; P [info tclversion]

PS

poImgUtil PushState

P "Pushed values:\n"
P "GetFormat: "      ; poImageMode GetFormat chns      ; poImgUtil PrintChans $chns Format
P "GetCompression: " ; poImageMode GetCompression chns ; poImgUtil PrintChans $chns Compression
P "GetDrawMask: "    ; poImageMode GetDrawMask chns    ; poImgUtil PrintChans $chns Drawmask
P "GetDrawColor: "   ; poImageMode GetDrawColor chns   ; poImgUtil PrintChans $chns Drawcolor
P "GetDrawMode: "    ; poImageMode GetDrawMode chns    ; poImgUtil PrintChans $chns Drawmode
PS

poImgUtil SetFormatRGBA      $UBYTE $FLOAT $OFF $FLOAT
poImgUtil SetCompressionRGBA $RLE $OFF $RLE $RLE
poImgUtil SetDrawMaskRGBA    $OFF $OFF $OFF $FLOAT
poImgUtil SetDrawColorRGBA   0.1 0.2 0.3 0.4
poImgUtil SetDrawModeRGBA    $ADD $SUB $XOR $REPLACE

P "Modified values:\n"
P "GetFormat: "      ; poImageMode GetFormat chns      ; poImgUtil PrintChans $chns Format
P "GetCompression: " ; poImageMode GetCompression chns ; poImgUtil PrintChans $chns Compression
P "GetDrawMask: "    ; poImageMode GetDrawMask chns    ; poImgUtil PrintChans $chns Drawmask
P "GetDrawColor: "   ; poImageMode GetDrawColor chns   ; poImgUtil PrintChans $chns Drawcolor
P "GetDrawMode: "    ; poImageMode GetDrawMode chns    ; poImgUtil PrintChans $chns Drawmode
PS

poImgUtil PopState

P "Popped values:\n"
P "GetFormat: "      ; poImageMode GetFormat chns      ; poImgUtil PrintChans $chns Format
P "GetCompression: " ; poImageMode GetCompression chns ; poImgUtil PrintChans $chns Compression
P "GetDrawMask: "    ; poImageMode GetDrawMask chns    ; poImgUtil PrintChans $chns Drawmask
P "GetDrawColor: "   ; poImageMode GetDrawColor chns   ; poImgUtil PrintChans $chns Drawcolor
P "GetDrawMode: "    ; poImageMode GetDrawMode chns    ; poImgUtil PrintChans $chns Drawmode
PS

P "End of test"

ui_show

if { [lindex $argv 0] eq "auto" } {
    ui_exit
    exit 0
}
