<<<<<<<<<<<<<<<<<

picture(oscar) Oscar picture(oscar)

NAME

picture

DESCRIPTION

The picture class is a generic class that defines the information necessary to specify images. The picture class contains the information which is common to all images. The bitmap contains the actual image data, while the other instance variables specify how that data is to be used or modified. The source in all cases refers to the image represented by the given picture object. The target is another picture object that the source will be mapped onto The actual execution of this mapping is done by recorder (a subclass of picture) when the message compose! is received. The instance variables which specify the positional mapping are all done in Normalized Device Coordinates (NDC), which have range from -1 to 1.

SUPERCLASS

picture

INSTANCE VARIABLES

bitmap is the structure which holds the values for every pixel of an image. Each pixel has a red, green, blue and alpha value. This instance variable cannot be set directly. It is set via other methods within the picture.

hold is a switch that indicates whether the bitmap can be changed or not. When hold_on! (hold= 1) no changes to the bitmap are possible and bitmap_free! has no effect. The default is off (0).

intensity is a value between 0 and 1 which indicates the brightness of the image. The default is 1.

scale is a factor applied to the image data. This must be a power of 2 in x and y directions. The default is (1,1).

source_lower_left is the lower left corner of the window of this image that will be mapped onto the target image (in NDC). The default is (-1,-1).

source_offset (2,2)

source_upper_right is the upper right corner of the window of this image that will be mapped onto the target image (in NDC). The default is (1,1).

status is a switch that indicates whether the picture is active or not (1 - on, 0 - off). The default is on.

target_lower_left is the position in NDC that the lower left corner of this image will be mapped onto in the target image. The default is (-1, -1).

rule is the way that this image is to be combined with the target image when it is composited. The valid rules are: CLEAR, REPLACE, PLUS, OVER, IN, OUT, ATOP, XOR. The default is REPLACE.

MESSAGES

atop! this method sets the rule by which the picture is combined to be atop.

bitmap? this returns a pointer to the bitmap that this picture is working with.

bitmap_free! this method releases all the memory that held pixel information.

clear! this method sets the rule by which the picture is combined to be clear.

free! this method releases all the memory that held pixel information.

hold= argument sets the bitmap hold status.

hold? returns the bitmap hold status.

hold_off! sets the bitmap status to off.

hold_on! sets the bitmap status to on.

in! this method sets the rule by which the picture is combined to be in.

intensity* argument multiplies a pictures intensity by a scalar.

intensity+ argument adds a scalar to a pictures intensity.

intensity= argument sets a pictures intensity to a scalar.

intensity? returns a picture intensity.

off! sets the status variable off (0).

on! sets the status variable on (1).

out! this method sets the rule by which the picture is combined to be out.

over! this method sets the rule by which the picture is combined to be over.

plus! this method sets the rule by which the picture is combined to be plus.

replace! this method sets the rule by which the picture is combined to be replace.

rule= argument sets the rule of an instance.

rule? returns the rule of an instance.

rules? this method prints out a list of the rules

scale* argument this method multiplies the scale by a power of 2.

scale+ argument this method adds a constant to a pictures scale(x and/or y).

scale= argument this method sets the scale of a picture.

scale? returns the scale of a picture.

source_lower_left=(+) argument sets (adds) the source_lower_left value.

source_lower_left? returns the source_lower_left value.

source_offset=(+) argument this method sets (adds) the value of the source offset and the clipping area lower left.

source_offset? returns source_offset value.

source_upper_right=(+) argument this method sets (adds) the value of the source

offset and the clipping area upper right.

source_upper_right? returns source_upper_right value.

status= sets the status of a picture.

status? returns the status of a picture.

target_lower_left=(+) argument this method sets (adds) the value of the target offset and the clipping area lower left.

target_lower_left? returns the target_lower_left value.

xor! this method sets the rule by which the picture is combined to be xor.

EXAMPLE

SEE ALSO

gert, recorder, sequence


Please send comments and suggestions to
consult@rpi.edu