SIMPOL Documentation

wxprintbitmapitem

Description

A wxprintbitmapitem object contains the description of where a specific bitmap will be printed on a page as well as its characteristics: the horizontal and vertical alignment, scaling, etc. These are associated with a specific template which in turn is used by a page in a printout. The bitmap used can come from the printout, the template, or the actual page being printed.

Type Tags

None

Object Value

Properties

PropertyTypeDescription
_type(*) This property is provided for use by the user to attach any object of any type to the type in which this property is provided.
__type(*) This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property.
alignmentstring Shows the alignment of the bitmap item within the rectangle that represents the boundaries of the item. The alignment is for both horizontal and vertical alignment. The string can be made up of two comma separated string values. The valid values are: "left", "right", "top", "bottom", "left,top", "right,bottom", "left,bottom", and "right,top" or the empty string (""). The order in which the dimensions are listed is undefined. If a dimension is not present, such as with "left" by itself, then the other dimension will be centered. The empty string would create an alignment both horizontally and vertically centered.
contentnamestring Contains the name of the wxprintbitmap object that contains the actual content of the bitmap item. If this property is equal to the empty string (""), then nothing will be printed.
contentsourcestring Contains the name of the source for the wxprintbitmap object, either "printout", "template", "page", or the empty string (""). There is no "system" source for bitmaps. If this property is equal to the empty string, then nothing will be printed.
heightinteger Specifies the height of the bitmap item in micrometers.
leftinteger Specifies the position of the left edge of the bitmap item in micrometers.
namestring The name of the wxprintbitmapitem object.
nextwxprintbitmapitem Specifies the next wxprintbitmapitem object in the ring of bitmap items that make up the template.
scalingstring Determines the type of scaling used on the bitmap. This can be one of: "hfit", "vfit", "handvfit", "preserveaspect", or the empty string. If no scaling is specified, then the image will be cropped to fit the container as needed, and based on the alignment settings. Otherwise the image will be stretched horizontally to fill the container, vertically to fill the container, or in both directions.
templatewxprintpagetemplate Specifies the wxprintpagetemplate object to which this bitmap item belongs.
topinteger Specifies the position of the top edge of the bitmap item in micrometers.
typetype Specifies the wxprintbitmapitem type object.
undergraphicsboolean Indicates whether the bitmap item is considered to be over the graphics items or under them in the z-order. It cannot be over some but under others. Either the bitmap item is over all graphics items, or it is under all of them.
widthinteger Specifies the width of the bitmap item in micrometers.

Methods

getcontent()

Description

This method retrieves the bitmap from the associated bitmap object. The page parameter is needed for items whose source is "page" or "printout" as a text or bitmap item doesn't know what pages or printouts it is on (in fact a template can be used for pages from many different printouts simultaneously).

Prototype

wxprintbitmapitemvar.getcontent ( wxprintpage page )

Parameters
ParameterDefault valueType nameDescription
page.nulwxprintpage The specific page from which to retrieve the bitmap item.

setalignment()

Description

This method assigns both the horizontal and vertical alignment for the bitmap item. The wxprintbitmapitem object itself is returned, to allow multiple setting methods to be put into one expression. The string can be made up of two comma separated string values. The valid values are: "left", "right", "top", "bottom", "left,top", "right,bottom", "left,bottom", and "right,top", and the empty string (""). The order in which the dimensions are provided is irrelevant as long as only maximum one value for each dimension is supplied. Providing two values for the same dimension of alignment is an error, such as "left,right". If an element is not supplied, it is assumed to be middle (in either dimension). Supplying an empty string would create an alignment both horizontally and vertically centered.

Prototype

wxprintbitmapitemvar.setalignment ( string alignment )

Parameters
ParameterDefault valueType nameDescription
alignmentThe current setting of the alignment propertystring The alignment string for both horizontal and vertical alignment for the bitmap item.

setcontent()

Description

Sets the name of the contentsource and the contentname properties for the bitmap item. The wxprintbitmapitem object itself is returned, to allow multiple setting methods to be put into one expression.

Prototype

wxprintbitmapitemvar.setcontent ( string contentsource, string contentname )

Parameters
ParameterDefault valueType nameDescription
contentsourceThe current value of the contentsource propertystring This must be one of: "printout", "template", "page", or the empty string (""). If the empty string is assigned, then nothing will be output.
contentnameThe current value of the contentname propertystring This is the name of the wxprintbitmap object that is used to provide the content for this bitmap item when it is printed. If the empty string ("") is assigned, then nothing will be output.

setname()

Description

Sets the name of the bitmap item. The wxprintbitmapitem object itself is returned, to allow multiple setting methods to be put into one expression.

Prototype

wxprintbitmapitemvar.setname ( string name )

Parameters
ParameterDefault valueType nameDescription
nameNonestring

The new name for the bitmap item.

[Note]Note

The name of any item: page, string, bitmap, etc. that can be accessed using the member operator must be unique across all rings associated with an object. For example in the case of a printout object, the same name cannot be assigned to a page and also to a string or a bitmap. The same name can also not be given to two items in the same ring.

setnext()

Description

Sets the position and z-order of the bitmap item in the ring of bitmap items. The first item in the ring is the lowest in the z-order.

Prototype

wxprintbitmapitemvar.setnext ( wxprintbitmapitem next )

Parameters
ParameterDefault valueType nameDescription
nextNonewxprintbitmapitem Calling the method with the value .nul sets a bitmap item to be the last one in the ring (the one before wxprintpagetemplate.firstbitmapitem) and passing any other bitmap item as the argument puts the target bitmap item immediately before the one specified as the parameter.

setposition()

Description

Sets the size and/or position of the bitmap item. The wxprintbitmapitem object itself is returned, to allow multiple setting methods to be put into one expression.

Prototype

wxprintbitmapitemvar.setposition ( integer left, integer top, integer width, integer height )

Parameters
ParameterDefault valueType nameDescription
leftThe current value of the left propertyinteger The new position of the left side of the bitmap item on the template.
topThe current value of the top propertyinteger The new position of the top edge of the bitmap item on the template.
widthThe current value of the width propertyinteger The new width of the bitmap item on the template.
heightThe current value of the height propertyinteger The new height of the bitmap item on the template.

setscaling()

Description

Sets the scaling method to be used for the bitmap in the bitmap item. The wxprintbitmapitem object itself is returned, to allow multiple setting methods to be put into one expression.

Prototype

wxprintbitmapitemvar.setscaling ( string scaling )

Parameters
ParameterDefault valueType nameDescription
scalingNonestring The scaling method to be used when adjusting the bitmap to its container. This is one of: "hfit", "vfit", "handvfit", "preserveaspect", or the empty string (""). If no scaling is specified, then the image will be cropped to fit the container as needed, and based on the alignment settings. Otherwise the image will be stretched horizontally to fill the container, vertically to fill the container, or in both directions.

setunders()

Description

Sets whether the bitmap item appears above or below graphics.

Prototype

wxprintbitmapitemvar.setunders ( boolean undergraphics )

Parameters
ParameterDefault valueType nameDescription
undergraphicsThe current value of the undergraphics propertyboolean This decides whether bitmap items are rendered as being underneath all objects of type wxgraphic on the template.