<div class="meta" robots="noindex">

</div>

Class

# iOSBitmap

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Picture</api/graphics/picture>` as a replacement.

</div>

## Description

A bitmap image that can be modified using the Graphics property.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                           | Type                                                  | Read-Only | Shared |
|--------------------------------|-------------------------------------------------------|-----------|--------|
| `Graphics<iosbitmap.graphics>` | `iOSGraphics</api/deprecated/iosgraphics>`            | ✓         |        |
| `Height<iosbitmap.height>`     | `UInteger</api/data_types/additional_types/uinteger>` | ✓         |        |
| `Image<iosbitmap.image>`       | `iOSImage</api/deprecated/iosimage>`                  | ✓         |        |
| `Scale<iosbitmap.scale>`       | `Double</api/data_types/double>`                      | ✓         |        |
| `Width<iosbitmap.width>`       | `UInteger</api/data_types/additional_types/uinteger>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                  | Parameters                                                                                                                                                                                                        | Returns | Shared |
|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|--------|
| `Constructor<iosbitmap.constructor0>` | width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, scale As `Double</api/data_types/double>`, opaque As `Boolean</api/data_types/boolean>` = `False</api/language/false>` |         |        |

## Property descriptions

<div id="iosbitmap.graphics">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Graphics

**Graphics** As `iOSGraphics</api/deprecated/iosgraphics>`

The iOSGraphics object for the bitmap that is used for drawing.

This property is read-only.

``` xojo
Var pic As New iOSBitmap(100, 100, 2.0, False)
pic.Graphics.DrawRect(10, 10, 60, 60)
```

<div id="iosbitmap.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Height

**Height** As `UInteger</api/data_types/additional_types/uinteger>`

The height of the bitmap that was created.

This property is read-only.

<div id="iosbitmap.image">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Image

**Image** As `iOSImage</api/deprecated/iosimage>`

The image that has been drawn to the bitmap. If you need to modify the image, use the Graphics property.

This property is read-only.

<div id="iosbitmap.scale">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Scale

**Scale** As `Double</api/data_types/double>`

The scale of the image that has been drawn to the bitmap.

This property is read-only.

<div id="iosbitmap.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Width

**Width** As `UInteger</api/data_types/additional_types/uinteger>`

The width of the image that has been drawn to the bitmap.

This property is read-only.

## Method descriptions

<div id="iosbitmap.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSBitmap.Constructor

**Constructor**(width As `Integer</api/data_types/integer>`, height As `Integer</api/data_types/integer>`, scale As `Double</api/data_types/double>`, opaque As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

<div class="note">

<div class="title">

Note

</div>

`Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.

</div>

Creates a bitmap image using the specified width, height, scale and opaqueness.

Setting opaque to True disables the alpha channel. If you know that you wil be filling every point in the bitmap, set opaque to True to improve performance.

The scale indicates how the image appears on the device. For example, bitmaps drawn with a scale of 1.0 will appear at half the size when drawn on a device with a 2x screen. When creating an <span class="title-ref">iOSBitmap</span> you intend to put on screen, you want your bitmap to have the same scale factor as the screen and the number of pixels in each dimension multiplied by the scale factor. Use the example code on the Declare page to check the device scale.

``` xojo
Var pic As New iOSBitmap(100, 100, 2.0, False)
pic.Graphics.DrawRect(10, 10, 60, 60)
```

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `iOSGraphics</api/deprecated/iosgraphics>`, `Picture</api/graphics/picture>` classes
