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
Property | Type | Description |
---|---|---|
_ | 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. |
alignment | string |
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.
|
contentname | string |
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.
|
contentsource | string |
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.
|
height | integer | Specifies the height of the bitmap item in micrometers. |
left | integer | Specifies the position of the left edge of the bitmap item in micrometers. |
name | string | The name of the wxprintbitmapitem object. |
next | wxprintbitmapitem | Specifies the next wxprintbitmapitem object in the ring of bitmap items that make up the template. |
scaling | string |
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.
|
template | wxprintpagetemplate | Specifies the wxprintpagetemplate object to which this bitmap item belongs. |
top | integer | Specifies the position of the top edge of the bitmap item in micrometers. |
type | type | Specifies the wxprintbitmapitem type object. |
undergraphics | boolean | 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. |
width | integer | 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
Parameter | Default value | Type name | Description |
---|---|---|---|
page | .nul | wxprintpage | 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
Parameter | Default value | Type name | Description |
---|---|---|---|
alignment | The current setting of the alignment property | string | 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
,
string contentsource
)
contentname
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
contentsource | The current value of the contentsource property | string |
This must be one of: "printout" ,
"template" , "page" , or the
empty string ("" ). If the empty string is
assigned, then nothing will be output.
|
contentname | The current value of the contentname property | string |
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
Parameter | Default value | Type name | Description | |||
---|---|---|---|---|---|---|
name | None | string |
The new name for the bitmap item.
|
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
Parameter | Default value | Type name | Description |
---|---|---|---|
next | None | wxprintbitmapitem |
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
,
integer left
,
integer top
,
integer width
)
height
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
left | The current value of the left property | integer | The new position of the left side of the bitmap item on the template. |
top | The current value of the top property | integer | The new position of the top edge of the bitmap item on the template. |
width | The current value of the width property | integer | The new width of the bitmap item on the template. |
height | The current value of the height property | integer | 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
Parameter | Default value | Type name | Description |
---|---|---|---|
scaling | None | string |
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
Parameter | Default value | Type name | Description |
---|---|---|---|
undergraphics | The current value of the undergraphics property | boolean | This decides whether bitmap items are rendered as being underneath all objects of type wxgraphic on the template. |