Class: BitmapData

BitmapData

BitmapData クラスを使用すると、Bitmap オブジェクトのデータ (ピクセル) を処理できます。
BitmapData クラスのメソッドを使用して、任意のサイズの透明または不透明のビットマップイメージを作成し
実行時に様々な方法で操作できます。

The BitmapData class lets you work with the data (pixels) of a Bitmap object.
You can use the methods of the BitmapData class to create arbitrarily sized transparent or
opaque bitmap images and manipulate them in various ways at runtime.

new next2d.display.BitmapData (width, height, transparent, color)

NameTypeDefaultDescription
widthnumber0optional
heightnumber0optional
transparentbooleantrueoptional
colornumber0xffffffffoptional

Members

next2d.display.BitmapData.namespace staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.display.BitmapData

canvas

Canvasクラス利用して BitmapData を生成します。
Use the Canvas class to generate BitmapData.

height readonly

ビットマップイメージの高さ(ピクセル単位)です。
The height of the bitmap image in pixels.

image

Imageクラスを利用して BitmapData を生成します。
Use the Image class to generate BitmapData.

namespace constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.display.BitmapData

transparent readonly

ビットマップイメージがピクセル単位の透明度をサポートするかどうかを定義します。
Defines whether the bitmap image supports per-pixel transparency.

width readonly

ビットマップイメージの幅(ピクセル単位)です。
The width of the bitmap image in pixels.

Methods

next2d.display.BitmapData.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class BitmapData]
Returns:
TypeDescription
string

dispose ()void

Returns:
TypeDescription
void

draw (source, matrix, color_transform, blend_mode, clip_rect, smoothing)void

NameTypeDefaultDescription
sourceDisplayObject
matrixMatrixnulloptional
color_transformColorTransformnulloptional
blend_modestringBlendMode.NORMALoptional
clip_rectRectanglenulloptional
smoothingbooleanfalseoptional
Returns:
TypeDescription
void

getContext2D ()CanvasRenderingContext2D

Returns:
TypeDescription
CanvasRenderingContext2D

toDataURL ()string

Returns:
TypeDescription
string

toString ()string

指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.

Default Value:
  • [object BitmapData]
Returns:
TypeDescription
string

toUint8Array ()Uint8Array

Returns:
TypeDescription
Uint8Array