Difference between revisions of "Picture.Constructor(width as Integer, height as Integer, bitmaps() As Picture)"

From Xojo Documentation

(Fixed parameters)
 
Line 5: Line 5:
 
| scope=public
 
| scope=public
 
| newinversion = 2015r4
 
| newinversion = 2015r4
| parameters=width as [[Integer]], height as [[Integer]], bitmaps As [[Picture]]
+
| parameters=width As [[Integer]], height As [[Integer]], bitmaps() As [[Picture]]
 
| platform=all
 
| platform=all
 
}}
 
}}

Latest revision as of 21:28, 25 November 2020

Constructor

Picture.Constructor(width As Integer, height As Integer, bitmaps() As Picture)

New in 2015r4

Creates an Image from one or more Bitmap pictures.

Exceptions

Exception Reason
InvalidArgumentException Raised if:
  • width or height are less than or equal to zero.
  • any of the bitmaps isn't actually a picture with Type = Picture.Bitmap.
  • if any of the bitmaps aren't the same aspect ratio as width and height.
  • if 'bitmaps' is empty.
NilObjectException Raised if:
  • bitmaps is Nil.
  • any of the bitmaps are Nil
OutOfMemoryException Raised if there is not enough memory to create the picture, which can happen with 32-bit apps.

Notes

The height and width are in points. The bitmaps are copied upon creation. All bitmaps must have the same aspect ratio. A bitmap's DPI will be calculated from the point size and the bitmap's size in pixels. Pictures created using this constructor have their Type set to Types.Image.