Adobe® Flash® Platform 用 ActionScript® 3.0 リファレンスガイド
ホーム  |  パッケージおよびクラスリストの非表示 |  パッケージ  |  クラス  |  新機能  |  索引  |  付録  |  英語で表示される理由
フィルター: AIR 30.0 以前, Flash Player 30.0 以前, Flash Lite 4
Flex 4.6 以前, Flash Pro CS6 以前
フィルターを非表示
flash.geom 

Matrix  - AS3

パッケージx

トップレベル
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

言語エレメント

グローバル定数
グローバル関数
演算子
ステートメント、キーワード、ディレクティブ
特殊な型

付録

新機能
コンパイルエラー
コンパイラー警告
ランタイムエラー
ActionScript 3 への移行
サポートされている文字セット
MXML のみのタグ
モーション XML エレメント
Timed Text タグ
使用されなくなったエレメントのリスト
Accessibility Implementation 定数
ActionScript の例の使用方法
法律上の注意
パッケージflash.geom
クラスpublic class Matrix
継承Matrix Inheritance Object

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

Matrix クラスは、2 つの座標空間の間におけるポイントのマッピング方法を決定する変換マトリックスを表します。Matrix オブジェクトのプロパティを設定し、Matrix オブジェクトを Transform オブジェクトの matrix プロパティに適用し、次に Transform オブジェクトを表示オブジェクトの transform プロパティとして適用することで、表示オブジェクトに対する各種グラフィック変換を実行できます。これらの変換機能には、平行移動(xy の位置変更)、回転、拡大 / 縮小、傾斜などが含まれます。

このような変換を「アフィン変換」と言います。アフィン変換では、変換中に線分の直線性が保たれるため、平行線は平行のままになります。

変換行列を表示オブジェクトに適用するには、Transform オブジェクトを作成して、そのオブジェクトの matrix プロパティを変換行列に設定し、表示オブジェクトの transform プロパティに Transform オブジェクトを設定します。Matrix オブジェクトは、次のようないくつかのメソッドのパラメーターとしても使用します。

  • BitmapData オブジェクトの draw() メソッド
  • Graphics オブジェクトの beginBitmapFill() メソッド、beginGradientFill() メソッドまたは lineGradientStyle() メソッド

変換行列オブジェクトは、次の内容を備えた 3 × 3 の行列です。

Matrix クラスのプロパティのマトリックス表記

従来の変換行列では、uv、および w プロパティによって特別な機能を提供します。Matrix クラスは 2 次元空間でのみ演算できるので、u プロパティと v プロパティの値は 0.0 で、w プロパティの値は 1.0 です。この行列の有効値は次のとおりです。

u、v、w の前提値を示した Matrix クラスのプロパティのマトリックス表記

Matrix オブジェクトの他の 6 つのプロパティ、abcdtx、および ty の値をすべて取得および設定できます。

Matrix クラスは、主要な 4 種類の変換機能(平行移動、拡大 / 縮小、回転、傾斜)に対応しています。専用メソッドを使用して、これらのうち 3 つの変換機能を設定できます。以下の表に示します。

変換メソッドマトリックスの値表示結果説明
平行移動(変位) translate(tx, ty) 移動メソッドのパラメーターのマトリックス表記 移動メソッドの効果を示す図 イメージを右に tx ピクセル、下に ty ピクセル移動します。
拡大 / 縮小 scale(sx, sy) 拡大 / 縮小メソッドのパラメーターのマトリックス表記 拡大 / 縮小メソッドの効果を示す図 各ピクセルの位置を x 軸方向に sx 倍、y 軸方向に sy 倍することで、イメージの大きさを変更します。
回転 rotate(q) 回転メソッドのプロパティのマトリックス表記 回転メソッドの効果を示す図 イメージを角度 q(単位はラジアン)だけ回転します。
傾斜または変形 なし。プロパティ bc に設定する必要があります。 傾斜機能のプロパティのマトリックス表記 傾斜機能の効果を示す図 x 軸または y 軸に平行な方向にイメージをスライドします。Matrix オブジェクトの b プロパティは、y 軸に沿った傾斜角度のタンジェントを表し、Matrix オブジェクトの c プロパティは、x 軸に沿った傾斜角度のタンジェントを表します。

効果的に複数の変換を組み合わせることができるように、変換関数はそれぞれ現在の行列プロパティを変更します。これを行うには、対象の表示オブジェクトの transform プロパティを使用して行列を適用する前に、複数の変換関数を呼び出します。

Matrix オブジェクトのメソッドを呼び出す前に、new Matrix() コンストラクターを使用して Matrix オブジェクトを作成する必要があります。

例を表示

さらに例を参照

関連する API エレメント



パブリックプロパティ
 プロパティ定義元
  a : Number
イメージを拡大 / 縮小または回転するときに x 軸方向のピクセルの配置に影響を与える値です。
Matrix
  b : Number
イメージを回転または傾斜させるときに y 軸方向のピクセルの配置に影響を与える値です。
Matrix
  c : Number
イメージを回転または傾斜させるときに x 軸方向のピクセルの配置に影響を与える値です。
Matrix
 Inheritedconstructor : Object
指定されたオブジェクトインスタンスのクラスオブジェクトまたはコンストラクター関数への参照です。
Object
  d : Number
イメージを拡大 / 縮小または回転するときに y 軸方向のピクセルの配置に影響を与える値です。
Matrix
  tx : Number
x 軸方向に各ポイントを平行移動する距離です。
Matrix
  ty : Number
y 軸方向に各ポイントを平行移動する距離です。
Matrix
パブリックメソッド
 メソッド定義元
  
Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0)
指定されたパラメーターで新しい Matrix オブジェクトを作成します。
Matrix
  
新しい Matrix オブジェクトとして、このマトリックスのクローンを返します。含まれるオブジェクトはまったく同じコピーになります。
Matrix
  
マトリックスを現在のマトリックスと連結して、2 つのマトリックスの図形効果を効果的に組み合わせます。
Matrix
  
copyColumnFrom(column:uint, vector3D:Vector3D):void
Vector3D オブジェクトを、呼び出し元の Matrix3D オブジェクトの特定の列にコピーします。
Matrix
  
copyColumnTo(column:uint, vector3D:Vector3D):void
呼び出し元の Matrix オブジェクトの特定の列を、Vector3D オブジェクトにコピーします。
Matrix
  
copyFrom(sourceMatrix:Matrix):void
すべてのマトリックスデータを、ソース Point オブジェクトから、呼び出し元の Matrix オブジェクトにコピーします。
Matrix
  
copyRowFrom(row:uint, vector3D:Vector3D):void
Vector3D オブジェクトを、呼び出し元の Matrix オブジェクトの特定の行にコピーします。
Matrix
  
copyRowTo(row:uint, vector3D:Vector3D):void
呼び出し元の Matrix オブジェクトの特定の行を、Vector3D オブジェクトにコピーします。
Matrix
  
createBox(scaleX:Number, scaleY:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void
拡大 / 縮小、回転、平行移動に関するパラメーターなどがあります。
Matrix
  
createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void
Graphics クラスの beginGradientFill() メソッドで使用する特定のスタイルを作成します。
Matrix
  
変換前の座標空間内のポイントが指定されると、そのポイントの変換後の座標を返します。
Matrix
 Inherited
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
  
各行列プロパティを null 変換になる値に設定します。
Matrix
  
元のマトリックスの逆の変換を実行します。
Matrix
 Inherited
Object クラスのインスタンスが、パラメーターとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inherited
指定されたプロパティが存在し、列挙できるかどうかを示します。
Object
  
Matrix オブジェクトに回転変換を適用します。
Matrix
  
行列に拡大 / 縮小の変換を適用します。
Matrix
 Inherited
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
  
setTo(aa:Number, ba:Number, ca:Number, da:Number, txa:Number, tya:Number):void
Matrix のメンバーを指定の値に設定します。
Matrix
 Inherited
ロケール固有の規則に従って書式設定された、このオブジェクトのストリング表現を返します。
Object
  
Matrix オブジェクトのプロパティを列挙するテキスト値を返します。
Matrix
  
Matrix オブジェクトで表現される図形変換を、指定されたポイントに適用した結果を返します。
Matrix
  
行列を x 軸と y 軸に沿って、dx パラメーターと dy パラメーターで指定された量だけ平行移動します。
Matrix
 Inherited
指定されたオブジェクトのプリミティブな値を返します。
Object
プロパティの詳細

a

プロパティ
public var a:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

イメージを拡大 / 縮小または回転するときに x 軸方向のピクセルの配置に影響を与える値です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、a の値を設定します。
import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
trace(myMatrix.a);  // 1

myMatrix.a = 2;
trace(myMatrix.a);  // 2

b

プロパティ 
public var b:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

イメージを回転または傾斜させるときに y 軸方向のピクセルの配置に影響を与える値です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、b の値を設定します。
import flash.geom.Matrix;
 
var myMatrix:Matrix = new Matrix();
trace(myMatrix.b);  // 0

var degrees:Number = 30;
var radians:Number = (degrees/180) * Math.PI;
myMatrix.b = Math.tan(radians);
trace(myMatrix.b);  // 0.5773502691896257

c

プロパティ 
public var c:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

イメージを回転または傾斜させるときに x 軸方向のピクセルの配置に影響を与える値です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、c の値を設定します。
import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
trace(myMatrix.c);  // 0

var degrees:Number = 30;
var radians:Number = (degrees/180) * Math.PI;
myMatrix.c = Math.tan(radians);
trace(myMatrix.c);  // 0.5773502691896257

d

プロパティ 
public var d:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

イメージを拡大 / 縮小または回転するときに y 軸方向のピクセルの配置に影響を与える値です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、d の値を設定します。
import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
trace(myMatrix.d);  // 1

myMatrix.d = 2;
trace(myMatrix.d);  // 2

tx

プロパティ 
public var tx:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

x 軸方向に各ポイントを平行移動する距離です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、tx の値を設定します。
import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
trace(myMatrix.tx);  // 0

myMatrix.tx = 50;  // 50
trace(myMatrix.tx);

ty

プロパティ 
public var ty:Number

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

y 軸方向に各ポイントを平行移動する距離です。


例  ( この例の使用方法 )
次の例では、Matrix オブジェクト myMatrix を作成し、ty の値を設定します。
import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
trace(myMatrix.ty);  // 0

myMatrix.ty = 50;
trace(myMatrix.ty);  // 50
コンストラクターの詳細

Matrix

()コンストラクター
public function Matrix(a:Number = 1, b:Number = 0, c:Number = 0, d:Number = 1, tx:Number = 0, ty:Number = 0)

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

指定されたパラメーターで新しい Matrix オブジェクトを作成します。行列表記の場合、プロパティは次のようになります。

u、v、w の前提値を示した Matrix クラスのプロパティのマトリックス表記

new Matrix() コンストラクターにパラメーターが指定されない場合は、次の値で構成される単位マトリックス(単位行列)を作成します。

a = 1
b = 0
c = 0
d = 1
tx = 0
ty = 0

行列表記の場合、単位行列は次のようになります。

Matrix クラスのプロパティのマトリックス表記

パラメーター
a:Number (default = 1) — イメージを拡大 / 縮小または回転するときに x 軸方向のピクセルの配置に影響を与える値です。
 
b:Number (default = 0) — イメージを回転または傾斜させるときに y 軸方向のピクセルの配置に影響を与える値です。
 
c:Number (default = 0) — イメージを回転または傾斜させるときに x 軸方向のピクセルの配置に影響を与える値です。
 
d:Number (default = 1) — イメージを拡大 / 縮小または回転するときに y 軸方向のピクセルの配置に影響を与える値です。
 
tx:Number (default = 0)x 軸方向に各ポイントを平行移動する距離です。
 
ty:Number (default = 0)y 軸方向に各ポイントを平行移動する距離です。

例  ( この例の使用方法 )

次の例では、matrix_1 を作成する際に Matrix() コンストラクターにパラメーターを渡していません。さらに、同じコンストラクターにパラメーターを渡して matrix_2 を作成しています。パラメーターを渡さずに作成した matrix_1 は、値(a=1, b=0, c=0, d=1, tx=0, ty=0)を持つ単位行列です。
import flash.geom.Matrix;

var matrix_1:Matrix = new Matrix();
trace(matrix_1);  // (a=1, b=0, c=0, d=1, tx=0, ty=0)

var matrix_2:Matrix = new Matrix(1, 2, 3, 4, 5, 6);
trace(matrix_2);  // (a=1, b=2, c=3, d=4, tx=5, ty=6)
メソッドの詳細

clone

()メソッド
public function clone():Matrix

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

新しい Matrix オブジェクトとして、このマトリックスのクローンを返します。含まれるオブジェクトはまったく同じコピーになります。

戻り値
Matrix — Matrix オブジェクトです。

concat

()メソッド 
public function concat(m:Matrix):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

マトリックスを現在のマトリックスと連結して、2 つのマトリックスの図形効果を効果的に組み合わせます。数学的に言うと、2 つのマトリックスを連結することは、マトリックスの乗算を使って組み合わせることと同じです。

例えば、行列 m1 はオブジェクトの大きさを 4 倍にし、行列 m2 はオブジェクトを 1.5707963267949(Math.PI/2)ラジアン回転する場合、m1.concat(m2) は、オブジェクトの大きさを 4 倍にし、そのオブジェクトを Math.PI/2 ラジアン回転する行列に m1 を変換します。

このメソッドは、連結された行列でソース行列を置き換えます。2 つのソース行列をどちらも変更せずに 2 つの行列を連結する場合は、クラスの例に示されているように、まず clone() メソッドを使用して、ソース行列をコピーします。

パラメーター

m:Matrix — ソースマトリックスに連結するマトリックスです。

copyColumnFrom

()メソッド 
public function copyColumnFrom(column:uint, vector3D:Vector3D):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

Vector3D オブジェクトを、呼び出し元の Matrix3D オブジェクトの特定の列にコピーします。

パラメーター

column:uint — データのコピー元となる列です。
 
vector3D:Vector3D — データのコピー元となる Vector3D オブジェクトです。

copyColumnTo

()メソッド 
public function copyColumnTo(column:uint, vector3D:Vector3D):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

呼び出し元の Matrix オブジェクトの特定の列を、Vector3D オブジェクトにコピーします。Vector3D オブジェクトの w エレメントは変更されません。

パラメーター

column:uint — データのコピー元となる列です。
 
vector3D:Vector3D — データのコピー元となる Vector3D オブジェクトです。

copyFrom

()メソッド 
public function copyFrom(sourceMatrix:Matrix):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

すべてのマトリックスデータを、ソース Point オブジェクトから、呼び出し元の Matrix オブジェクトにコピーします。

パラメーター

sourceMatrix:Matrix — データのコピー元となる Matrix オブジェクトです。

copyRowFrom

()メソッド 
public function copyRowFrom(row:uint, vector3D:Vector3D):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

Vector3D オブジェクトを、呼び出し元の Matrix オブジェクトの特定の行にコピーします。

パラメーター

row:uint — データのコピー元となる行です。
 
vector3D:Vector3D — データのコピー元となる Vector3D オブジェクトです。

copyRowTo

()メソッド 
public function copyRowTo(row:uint, vector3D:Vector3D):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

呼び出し元の Matrix オブジェクトの特定の行を、Vector3D オブジェクトにコピーします。Vector3D オブジェクトの w エレメントは変更されません。

パラメーター

row:uint — データのコピー元となる行です。
 
vector3D:Vector3D — データのコピー元となる Vector3D オブジェクトです。

createBox

()メソッド 
public function createBox(scaleX:Number, scaleY:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

拡大 / 縮小、回転、平行移動に関するパラメーターなどがあります。マトリックスに適用する際に、これらのパラメーターに基づいて、マトリックスの値を設定します。

createBox() メソッドを使用すると、identity()rotate()scale()translate() の各メソッドを続けて適用するのと効果が同じになる行列を取得できます。例えば、mat1.createBox(2,2,Math.PI/4,100,100) の効果は次のステートメントのものと同じです。

     import flash.geom.Matrix;
     
     var mat1:Matrix = new Matrix();
     mat1.identity();
     mat1.rotate(Math.PI/4);
     mat1.scale(2,2);
     mat1.translate(10,20);
     

パラメーター

scaleX:Number — 水平方向の拡大 / 縮小倍率です。
 
scaleY:Number — 垂直方向の拡大 / 縮小倍率です。
 
rotation:Number (default = 0) — 回転量(ラジアン単位)です。
 
tx:Number (default = 0)x 軸に沿って右方向に平行移動するピクセル数です。
 
ty:Number (default = 0)y 軸に沿って下方向に平行移動するピクセル数です。

関連する API エレメント


例  ( この例の使用方法 )

次の例では、myMatrix の x の尺度、y の尺度、回転、x の位置および y の位置を、createBox() メソッドを呼び出すことで設定しています。
package
{
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.geom.Matrix;
    import flash.geom.Transform;
    
    public class Matrix_createBox extends Sprite
    {
        public function Matrix_createBox()
        {
             var myMatrix:Matrix = new Matrix();
             trace(myMatrix.toString());  // (a=1, b=0, c=0, d=1, tx=0, ty=0)
             
             myMatrix.createBox(1, 2, Math.PI/4, 50, 100);
             trace(myMatrix.toString());  
             // (a=0.7071067811865476, b=1.414213562373095, c=-0.7071067811865475, 
             //  d=1.4142135623730951, tx=50, ty=100)
             
             var rectangleShape:Shape = createRectangle(20, 80, 0xFF0000);   
             addChild(rectangleShape);
              
             var rectangleTrans:Transform = new Transform(rectangleShape);
             rectangleTrans.matrix = myMatrix;
        }
        
        public function createRectangle(w:Number, h:Number, color:Number):Shape 
        {
            var rect:Shape = new Shape();
            rect.graphics.beginFill(color);
            rect.graphics.drawRect(0, 0, w, h);
            addChild(rect);
            return rect;
        }
    }
}

createGradientBox

()メソッド 
public function createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

Graphics クラスの beginGradientFill() メソッドおよび lineGradientStyle() メソッドで使用する特定のスタイルを作成します。width と height は scaleXscaleY のペアで拡大 / 縮小されます。txty の値は、width と height の半分だけオフセットされます。

例えば、次の性質を持つグラデーションを作成するとします。

  • GradientType.LINEAR
  • グリーンとブルーの 2 色、ratios 配列を [0, 255] に設定
  • SpreadMethod.PAD
  • InterpolationMethod.LINEAR_RGB

パラメーターの異なる createGradientBox() メソッドを使用して定義された行列のグラデーションは、次の図のとおりです。

createGradientBox() の設定グラデーションの結果
width = 25;
     height = 25; 
     rotation = 0; 
     tx = 0; 
     ty = 0;
生成される線状グラデーション
width = 25; 
     height = 25; 
     rotation = 0; 
     tx = 25; 
     ty = 0;
生成される線状グラデーション
width = 50; 
     height = 50; 
     rotation = 0; 
     tx = 0; 
     ty = 0;
生成される線状グラデーション
width = 50;
     height = 50; 
     rotation = Math.PI / 4; // 45 degrees
     tx = 0; 
     ty = 0;
生成される線状グラデーション

パラメーター

width:Number — グラデーションボックスの幅です。
 
height:Number — グラデーションボックスの高さです。
 
rotation:Number (default = 0) — 回転量(ラジアン単位)です。
 
tx:Number (default = 0)x 軸に沿って右方向に平行移動(移動)する距離(ピクセル単位)です。この値は、width パラメーターの半分だけオフセットされます。
 
ty:Number (default = 0)y 軸に沿って下方向に平行移動(移動)する距離(ピクセル単位)です。この値は、height パラメーターの半分だけオフセットされます。

関連する API エレメント


例  ( この例の使用方法 )

次の例では、myMatrix の x の尺度、y の尺度、回転、x の位置および y の位置を、createBox() メソッドを呼び出すことで設定しています。
package
{
    import flash.display.GradientType;
    import flash.display.Sprite;
    import flash.geom.Matrix;
    
    public class Matrix_createGradientBox extends Sprite
    {
        public function Matrix_createGradientBox()
        {
             var myMatrix:Matrix = new Matrix();
             trace(myMatrix.toString());          // (a=1, b=0, c=0, d=1, tx=0, ty=0)
             
             myMatrix.createGradientBox(200, 200, 0, 50, 50);
             trace(myMatrix.toString());          // (a=0.1220703125, b=0, c=0, d=0.1220703125, tx=150, ty=150)
             
             var colors:Array = [0xFF0000, 0x0000FF];
             var alphas:Array = [100, 100];
             var ratios:Array = [0, 0xFF];
             
             this.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, myMatrix);
             this.graphics.drawRect(0, 0, 300, 200);
        }
    }
}

deltaTransformPoint

()メソッド 
public function deltaTransformPoint(point:Point):Point

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

変換前の座標空間内のポイントが指定されると、そのポイントの変換後の座標を返します。transformPoint() メソッドを使用して適用される通常の変換とは異なり、deltaTransformPoint() メソッドの変換では平行移動パラメーター txty が考慮されません。

パラメーター

point:Point — 行列変換の結果として得られるポイントです。

戻り値
Point — 行列変換を適用した結果のポイントです。

identity

()メソッド 
public function identity():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

各行列プロパティを null 変換になる値に設定します。単位行列を適用して変形したオブジェクトは、元のオブジェクトと同じになります。

identity() メソッドを呼び出すと、結果として得られる行列のプロパティは、a=1, b=0, c=0, d=1, tx=0, ty=0 になります。

行列表記の場合、単位行列は次のようになります。

Matrix クラスのプロパティのマトリックス表記

invert

()メソッド 
public function invert():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

元のマトリックスの逆の変換を実行します。逆マトリックスをオブジェクトに適用して、元のマトリックスの適用時に実行された変換を取り消すことができます。


例  ( この例の使用方法 )

次の例では、halfScaleMatrix を作成するために invert() メソッド(doubleScaleMatrix)を呼び出しています。その後、この 2 つのマトリックスが他方のマトリックスの逆マトリックス、つまり、他方のマトリックスで実行された変換を取り消すマトリックスであることを originalAndInverseMatrixnoScaleMatrix と同等)を作成することによって示します。
package
{
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.geom.Matrix;
    import flash.geom.Transform;
    
    public class Matrix_invert extends Sprite
    {
        public function Matrix_invert()
        {
            var rect0:Shape = createRectangle(20, 80, 0xFF0000);   
            var rect1:Shape = createRectangle(20, 80, 0x00FF00);   
            var rect2:Shape = createRectangle(20, 80, 0x0000FF);
            var rect3:Shape = createRectangle(20, 80, 0x000000);
            
            var trans0:Transform = new Transform(rect0);
            var trans1:Transform = new Transform(rect1);
            var trans2:Transform = new Transform(rect2);
            var trans3:Transform = new Transform(rect3);
             
            var doubleScaleMatrix:Matrix = new Matrix(2, 0, 0, 2, 0, 0);
            trans0.matrix = doubleScaleMatrix;
            trace(doubleScaleMatrix.toString());  // (a=2, b=0, c=0, d=2, tx=0, ty=0)
             
            var noScaleMatrix:Matrix = new Matrix(1, 0, 0, 1, 0, 0);
            trans1.matrix = noScaleMatrix;
            rect1.x = 50;
            trace(noScaleMatrix.toString());  // (a=1, b=0, c=0, d=1, tx=0, ty=0)
             
            var halfScaleMatrix:Matrix = doubleScaleMatrix.clone();
            halfScaleMatrix.invert();
            trans2.matrix = halfScaleMatrix;
            rect2.x = 100;
            trace(halfScaleMatrix.toString());  // (a=0.5, b=0, c=0, d=0.5, tx=0, ty=0)
             
            var originalAndInverseMatrix:Matrix = doubleScaleMatrix.clone();
            originalAndInverseMatrix.concat(halfScaleMatrix);
            trans3.matrix = originalAndInverseMatrix;
            rect3.x = 150;
            trace(originalAndInverseMatrix.toString());  // (a=1, b=0, c=0, d=1, tx=0, ty=0)            
        }
        
        public function createRectangle(w:Number, h:Number, color:Number):Shape 
        {
            var rect:Shape = new Shape();
            rect.graphics.beginFill(color);
            rect.graphics.drawRect(0, 0, w, h);
            addChild(rect);
            return rect;
        }
    }
}

rotate

()メソッド 
public function rotate(angle:Number):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

Matrix オブジェクトに回転変換を適用します。

rotate() メソッドは、Matrix オブジェクトの abc および d の各プロパティを変更します。行列表記の場合、これは現在の行列を次の行列と連結することと同じです。

拡大 / 縮小メソッドのパラメーターのマトリックス表記

パラメーター

angle:Number — 回転角度(ラジアン単位)です。

scale

()メソッド 
public function scale(sx:Number, sy:Number):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

行列に拡大 / 縮小の変換を適用します。x 軸方向に sx 倍、y 軸方向に sy 倍に変更されます。

scale() メソッドは、Matrix オブジェクトの a プロパティと d プロパティを変更します。行列表記の場合、これは現在の行列を次の行列と連結することと同じです。

拡大 / 縮小メソッドのパラメーターのマトリックス表記

パラメーター

sx:Number — オブジェクトを x 軸方向に拡大 / 縮小するために使用される乗数です。
 
sy:Number — オブジェクトを y 軸方向に拡大 / 縮小するために使用される乗数です。

setTo

()メソッド 
public function setTo(aa:Number, ba:Number, ca:Number, da:Number, txa:Number, tya:Number):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 11, AIR 3.0, Flash Lite 4

Matrix のメンバーを指定の値に設定します。

パラメーター

aa:Number — マトリックスに設定する値です。
 
ba:Number
 
ca:Number
 
da:Number
 
txa:Number
 
tya:Number

toString

()メソッド 
public function toString():String

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

Matrix オブジェクトのプロパティを列挙するテキスト値を返します。

戻り値
String — Matrix オブジェクトのプロパティ(abcdtxty)の値が含まれるストリング。

transformPoint

()メソッド 
public function transformPoint(point:Point):Point

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

Matrix オブジェクトで表現される図形変換を、指定されたポイントに適用した結果を返します。

パラメーター

point:Point — 行列変換の結果として得られるポイントです。

戻り値
Point — 行列変換を適用した結果のポイントです。

translate

()メソッド 
public function translate(dx:Number, dy:Number):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: AIR 1.0, Flash Player 9, Flash Lite 4

x 軸と y 軸に沿って、dx パラメーターと dy パラメーターで指定された量だけ行列を平行移動します。

パラメーター

dx:Numberx 軸に沿って右方向に移動する量(ピクセル単位)です。
 
dy:Numbery 軸に沿って下方向に移動する量(ピクセル単位)です。

MatrixExample.as

次の例では、MatrixExample クラスを使用してグラデーション塗りの大きな正方形を作成する方法を示します。これを行うには、以下の手順を実行します。
  1. 新しい Matrix オブジェクト myMatrix を作成し、trace() メソッドを使用して、myMatrix オブジェクトのプロパティのデフォルト値を出力します。
  2. アプリケーションは、createGradientBox() を、width および height のパラメーターを 200 ピクセル、回転なし、x 軸および y 軸に沿う平行移動距離を 50 ピクセルに設定して呼び出します。
  3. myMatrix オブジェクトを createGradientBox() の呼び出し後に再びプリントし、変更内容を表示します。
  4. 3 つの変数を設定してグラデーションボックスを塗る方法を制御します。
    • colors:グラデーションカラーを赤から青の範囲で設定します。
    • alphas:透明度を不透明に設定します。
    • ratios:カラーの分布を、赤と青が共に等しくなるように設定します。
  5. グラフィックメソッド beginGradientFill() を呼び出します。このメソッドは、myMatrix オブジェクトを操作し、lineTo() メソッドを呼び出して、グラデーション塗りの四角形を作成します。
package {
    import flash.geom.Matrix;
    import flash.display.Sprite;
    import flash.display.GradientType;

    public class MatrixExample extends Sprite {

        public function MatrixExample() {
            var myMatrix:Matrix = new Matrix();
            trace(myMatrix.toString());    // (a=1, b=0, c=0, d=1, tx=0, ty=0)

            myMatrix.createGradientBox(200, 200, 0, 50, 50);
            trace(myMatrix.toString());    // (a=0.1220703125, b=0, c=0, d=0.1220703125, tx=150, ty=150)

            var colors:Array = [0xFF0000, 0x0000FF];
            var alphas:Array = [1, 1];
            var ratios:Array = [0, 0xFF];
            graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, myMatrix);
            graphics.lineTo(0, 300);
            graphics.lineTo(300, 300);
            graphics.lineTo(300, 0);
            graphics.lineTo(0, 0);
        }
    }
}




[ X ]英語で表示される理由
ActionScript 3.0 リファレンスガイドのコンテンツが英語で表示されます。

ActionScript 3.0 リファレンスガイドのすべての部分がすべての言語に翻訳されているわけではありません。言語エレメントが翻訳されていない場合、そのエレメントは英語で表示されます。例えば、ga.controls.HelpBox クラスはどの言語にも訳されていません。このため、リファレンスガイドの日本語バージョンでは、ga.controls.HelpBox クラスは英語で表示されます。