Jump to content

PM2DImage: Difference between revisions

From EDM2
Created page with "extends PM2Drawable as public 2D PNG Image class. The PM2DImage class accesses and manages PNG bitmap resources through reference-counting. Reference-counting allows the sys..."
 
Line 21: Line 21:
!Short Description
!Short Description
|-
|-
|[[PM2DImage]]
|PM2DImage
|  
|  
|constructor  
|constructor  
Line 28: Line 28:


|-
|-
|[[PM2DImage]]
|PM2DImage
|  
|  
|constructor  
|constructor  
Line 35: Line 35:


|-
|-
|[[operator =]]
|operator =
|  
|  
|operator  
|operator  
Line 42: Line 42:


|-
|-
|[[handle]]
|handle
|  
|  
|method  
|method  
Line 49: Line 49:


|-
|-
|[[rectangle]]
|rectangle
|  
|  
|method  
|method  
Line 56: Line 56:


|-
|-
|[[bound]]
|bound
|  
|  
|method  
|method  
Line 63: Line 63:


|-
|-
|[[move]]
|move
|  
|  
|method  
|method  
Line 70: Line 70:


|-
|-
|[[draw]]
|draw
|  
|  
|method  
|method  
Line 76: Line 76:
|Draws the bitmap to the specific presentation space.
|Draws the bitmap to the specific presentation space.


|}  
|}


== constructor PM2DImage ==
== constructor PM2DImage ==

Revision as of 19:07, 14 March 2018

extends PM2Drawable as public

2D PNG Image class.

The PM2DImage class accesses and manages PNG bitmap resources through reference-counting. Reference-counting allows the system to use one bitmap in multiple places. The library maintains the lifetime of this bitmap until all users are finished with it.

You can construct, destruct, copy, and assign objects of this class.

Source
pm_2dimage.h:28
Author
Dmitry A Steklenev
Version
1.0

Contents

Entity Inherited From Type Scope Short Description
PM2DImage constructor public Constructs the bitmap image object.
PM2DImage constructor public Constructs the bitmap image object from another object.
operator = operator public Assigns the value of one bitmap object to another.
handle method public Returns the bitmap handle.
rectangle method public Returns the bitmap rectangle.
bound method public Return the bounding rectangle for this image.
move method public Moves image to another position.
draw method public Draws the bitmap to the specific presentation space.

constructor PM2DImage

Constructs the bitmap image object.

Load a PNG bitmap image from the specified resource library with its specified bitmap identifier. If you have not already loaded the bitmap and you want load it from the default resource library, use this constructor.

Source:pm_2dimage.h:46 Params:     
x

Horizontal position of the bitmap.
y

Vertical position of the bitmap.
res_id

The identifier of the bitmap.
hmodule

Module handle referencing a dynamic link library containing the
                resource or NULLHANDLE for the application's module.

Code:

public 'PM2DImage' ( LONG x ,
LONG y ,
SHORT res_id ,
HMODULE hmodule )

constructor PM2DImage

Constructs the bitmap image object from another object.

Source:pm_2dimage.h:49  Code:
public 'PM2DImage' ( const PM2DImage & )

operator =

Assigns the value of one bitmap object to another.

Source:pm_2dimage.h:51  Code:
public PM2DImage & 'operator =' ( const PM2DImage & )

method handle

Returns the bitmap handle.

Source:pm_2dimage.h:54  Code:
public HBITMAP2 'handle' ( ) const

method rectangle

Returns the bitmap rectangle.

Source:pm_2dimage.h:57  Code:
public virtual PMRect 'rectangle' ( ) const

method bound

Return the bounding rectangle for this image.

Source:pm_2dimage.h:59  Code:
public virtual PMRect 'bound' ( ) const

method move

Moves image to another position.

Source:pm_2dimage.h:61  Code:
public virtual void 'move' ( LONG x ,
LONG y )

method draw

Draws the bitmap to the specific presentation space.

Source:pm_2dimage.h:64  Code:
public virtual void 'draw' ( HPS hps )