Back: BLOX.BForm-accessing Up: BLOX package Forward: BLOX.BImage class-arrows   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.22 BLOX.BImage

Defined in namespace BLOX
Superclass: BLOX.BPrimitive
Category: Graphics-Windows
I can display colorful images.

1.22.1 BLOX.BImage class: arrows  (class)
1.22.2 BLOX.BImage class: GNU  (class)
1.22.3 BLOX.BImage class: icons  (class)
1.22.4 BLOX.BImage class: instance creation  (class)
1.22.5 BLOX.BImage class: small icons  (class)
1.22.6 BLOX.BImage: accessing  (instance)
1.22.7 BLOX.BImage: image management  (instance)
1.22.8 BLOX.BImage: widget protocol  (instance)


1.22.1 BLOX.BImage class: arrows

downArrow
Answer the XPM representation of a 12x12 arrow pointing downwards.

leftArrow
Answer the XPM representation of a 12x12 arrow pointing leftwards.

rightArrow
Answer the XPM representation of a 12x12 arrow pointing rightwards.

upArrow
Answer the XPM representation of a 12x12 arrow pointing upwards.


1.22.2 BLOX.BImage class: GNU

gnu
Answer the XPM representation of a 48x48 GNU.


1.22.3 BLOX.BImage class: icons

exclaim
Answer the XPM representation of a 32x32 exclamation mark icon.

info
Answer the XPM representation of a 32x32 `information' icon.

question
Answer the XPM representation of a 32x32 question mark icon.

stop
Answer the XPM representation of a 32x32 `critical stop' icon.


1.22.4 BLOX.BImage class: instance creation

new: parent data: aString
Answer a new BImage widget laid inside the given parent widget, loading data from the given string (Base-64 encoded GIF, XPM, PPM are supported).

new: parent image: aFileStream
Answer a new BImage widget laid inside the given parent widget, loading data from the given file (GIF, XPM, PPM are supported).

new: parent size: aPoint
Answer a new BImage widget laid inside the given parent widget, showing by default a transparent image of aPoint size.


1.22.5 BLOX.BImage class: small icons

directory
Answer the Base-64 GIF representation of a `directory folder' icon.

file
Answer the Base-64 GIF representation of a `file' icon.


1.22.6 BLOX.BImage: accessing

backgroundColor
Answer the value of the backgroundColor option for the widget.

Specifies the normal background color to use when displaying the widget.

backgroundColor: value
Set the value of the backgroundColor option for the widget.

Specifies the normal background color to use when displaying the widget.

displayHeight
Answer the value of the displayHeight option for the widget.

Specifies the height of the image in pixels. This is not the height of the widget, but specifies the area of the widget that will be taken by the image.

displayHeight: value
Set the value of the displayHeight option for the widget.

Specifies the height of the image in pixels. This is not the height of the widget, but specifies the area of the widget that will be taken by the image.

displayWidth
Answer the value of the displayWidth option for the widget.

Specifies the width of the image in pixels. This is not the width of the widget, but specifies the area of the widget that will be taken by the image.

displayWidth: value
Set the value of the displayWidth option for the widget.

Specifies the width of the image in pixels. This is not the width of the widget, but specifies the area of the widget that will be taken by the image.

foregroundColor
Answer the value of the foregroundColor option for the widget.

Specifies the normal foreground color to use when displaying the widget.

foregroundColor: value
Set the value of the foregroundColor option for the widget.

Specifies the normal foreground color to use when displaying the widget.

gamma
Answer the value of the gamma option for the widget.

Specifies that the colors allocated for displaying the image widget should be corrected for a non-linear display with the specified gamma exponent value. (The intensity produced by most CRT displays is a power function of the input value, to a good approximation; gamma is the exponent and is typically around 2). The value specified must be greater than zero. The default value is one (no correction). In general, values greater than one will make the image lighter, and values less than one will make it darker.

gamma: value
Set the value of the gamma option for the widget.

Specifies that the colors allocated for displaying the image widget should be corrected for a non-linear display with the specified gamma exponent value. (The intensity produced by most CRT displays is a power function of the input value, to a good approximation; gamma is the exponent and is typically around 2). The value specified must be greater than zero. The default value is one (no correction). In general, values greater than one will make the image lighter, and values less than one will make it darker.


1.22.7 BLOX.BImage: image management

blank
Blank the corresponding image

data: aString
Set the image to be drawn to aString, which can be a GIF in Base-64 representation or an X pixelmap.

dither
Recalculate the dithered image in the window where the image is displayed. The dithering algorithm used in displaying images propagates quantization errors from one pixel to its neighbors. If the image data is supplied in pieces, the dithered image may not be exactly correct. Normally the difference is not noticeable, but if it is a problem, this command can be used to fix it.

fillFrom: origin extent: extent color: color
Fill a rectangle with the given origin and extent, using the given color.

fillFrom: origin to: corner color: color
Fill a rectangle between the given corners, using the given color.

fillRectangle: rectangle color: color
Fill a rectangle having the given bounding box, using the given color.

image: aFileStream
Read a GIF or XPM image from aFileStream. The whole contents of the file are read, not only from the file position.

imageHeight
Specifies the height of the image, in pixels. This option is useful primarily in situations where you wish to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink vertically to fit the data stored in it.

imageWidth
Specifies the width of the image, in pixels. This option is useful primarily in situations where you wish to build up the contents of the image piece by piece. A value of zero (the default) allows the image to expand or shrink horizontally to fit the data stored in it.

lineFrom: origin extent: extent color: color
Draw a line with the given origin and extent, using the given color.

lineFrom: origin to: corner color: color
This method's functionality has not been implemented yet.

lineFrom: origin toX: endX color: color
Draw an horizontal line between the given corners, using the given color.

lineFrom: origin toY: endY color: color
Draw a vertical line between the given corners, using the given color.

lineInside: rectangle color: color
Draw a line having the given bounding box, using the given color.


1.22.8 BLOX.BImage: widget protocol

destroyed
Private - The receiver has been destroyed, clear the corresponding Tcl image to avoid memory leaks.



Back: BLOX.BImage-image management Up: BLOX.BImage Forward: BLOX.BLabel   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on February, 22 2012 using texi2html