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 태그
사용되지 않는 요소의 목록
액세스 가능성 구현 상수
ActionScript 예제 사용 방법
법적 고지 사항
패키지flash.geom
클래스public class Matrix
상속Matrix Inheritance Object

언어 버전: ActionScript 3.0
런타임 버전: AIR 1.0, Flash Player 9, Flash Lite 4

Matrix 클래스는 특정 좌표 공간의 점을 다른 좌표 공간으로 매핑하는 방법을 결정하는 변형 행렬을 나타냅니다. Matrix 객체의 속성을 설정하여 Transform 객체의 matrix 속성에 적용한 다음, 이 Transform 객체를 표시 객체의 transform 속성으로 적용함으로써 표시 객체에서 다양한 그래픽 변형 작업을 수행할 수 있습니다. 이러한 변형 기능으로는 평행 이동(xy 위치 변경), 회전, 크기 조절 및 기울이기 등이 있습니다.

이러한 종류의 변형을 총칭하여 어파인 변형(affine transformations)이라고 합니다. 어파인 변형에서는 변형 과정에서 선이 곧은 상태를 유지하므로 평행선이 그대로 평행을 이루게 됩니다.

표시 객체에 변형 행렬을 적용하려면 Transform 객체를 만들어 matrix 속성을 변형 행렬로 설정한 다음, 표시 객체의 transform 속성을 Transform 객체로 설정합니다. Matrix 객체는 다음을 비롯한 일부 메서드에서 매개 변수로 사용할 수 있습니다.

  • BitmapData 객체의 draw() 메서드
  • Graphics 객체의 beginBitmapFill() 메서드, beginGradientFill() 메서드 또는 lineGradientStyle() 메서드

변형 행렬 객체는 다음 내용이 들어 있는 3 x 3 행렬입니다.

행렬 표기법의 Matrix 클래스 속성

기존의 변형 행렬에서 u, vw 속성은 추가적인 기능을 제공합니다. Matrix 클래스는 2차원 영역에서만 작동할 수 있으므로 항상 uv의 속성 값은 0.0, w의 속성 값은 1.0으로 가정합니다. 이 행렬의 유효 값은 다음과 같습니다.

u, v, w의 표시 값을 보여 주는 행렬 표기법의 Matrix 클래스 속성

Matrix 객체에서 나머지 여섯 가지 속성(a, b, c, d, txty) 값을 가져오고 설정할 수 있습니다.

Matrix 클래스는 평행 이동, 크기 조절, 회전 및 기울이기의 네 가지 주요 변형 종류를 지원합니다. 다음 테이블에서 설명하는 특수한 메서드를 사용하면 이 중 세 가지 변형을 설정할 수 있습니다.

변형 종류메서드Matrix 값표시 결과설명
평행 이동(위치 이동) translate(tx, ty) Translate 메서드 매개 변수의 행렬 표기법 Translate 메서드의 효과를 나타내는 그림 이미지를 오른쪽으로 tx픽셀, 아래쪽으로 ty픽셀 이동합니다.
크기 조절 scale(sx, sy) Scale 메서드 매개 변수의 행렬 표기법 Scale 메서드의 효과를 나타내는 그림 각 픽셀의 x 축 위치에 sx, y 축 위치에 sy를 곱하여 이미지 크기를 조절합니다.
회전 rotate(q) Rotate 메서드 속성의 행렬 표기법 Rotate 메서드의 효과를 나타내는 그림 라디안 단위로 측정된 각도 q만큼 이미지를 회전합니다.
기울이기 또는 시어링(shearing) 메서드가 없으므로 속성 bc를 설정해야 합니다. Skew 함수 속성의 행렬 표기법 Skew 함수의 효과를 나타내는 그림 이미지를 x 축이나 y 축에 평행하게 점차 이동합니다. Matrix 객체의 b 속성은 y 축을 기준으로 한 경사각의 탄젠트 값을 나타내고, 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
  
행렬을 현재 행렬과 연결하여 두 행렬의 기하학적 효과를 효율적으로 결합합니다.
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() 및 lineGradientStyle() 메서드에서 사용할 특정한 스타일의 행렬을 만듭니다.
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
  
dx 및 dy 매개 변수에 지정된 대로 x 및 y 축을 따라 행렬을 평행 이동합니다.
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() 생성자에 매개 변수를 보내지 않고 matrix_1을 만들고, 이 생성자에 매개 변수를 보내어 matrix_2를 만듭니다. 매개 변수 없이 만들어진 matrix_1a=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

행렬을 현재 행렬과 연결하여 두 행렬의 기하학적 효과를 효율적으로 결합합니다. 수학적 용어에서 두 행렬을 연결한다는 것은 행렬 곱셈을 사용하여 두 행렬을 결합하는 것과 같습니다.

예를 들어 행렬 m1이 인수 4만큼 객체의 크기를 조절하고 행렬 m2가 1.5707963267949 라디안(Math.PI/2)만큼 객체를 회전하는 경우, m1.concat(m2)m1을 인수 4만큼 객체의 크기를 조절하고 Math.PI/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 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 createBox() 메서드를 호출하여 myMatrix의 x 비율, y 비율, 회전, x 위치 및 y 위치를 설정합니다.
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() 메서드에 사용할 특정한 스타일의 행렬을 만듭니다. 폭과 높이는 scaleX / scaleY 쌍으로 크기가 조절되고 tx/ty 값은 폭과 높이의 절반만큼 오프셋됩니다.

예를 들어 다음 특성을 갖는 그래디언트를 생각해 보십시오.

  • GradientType.LINEAR
  • 비율 배열이 [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 요소


예제  ( 예제 사용 방법 )

다음 예제에서는 createBox() 메서드를 호출하여 myMatrix의 x 비율, y 비율, 회전, x 위치 및 y 위치를 설정합니다.
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

원행렬의 반대 변형을 수행합니다. 역행렬을 객체에 적용하여 원행렬을 적용할 때 수행한 변형을 실행 취소할 수 있습니다.


예제  ( 예제 사용 방법 )

다음 예제에서는 doubleScaleMatrixinvert() 메서드를 호출하여 halfScaleMatrix를 만듭니다. 그런 다음 이 두 객체가 서로 간의 변형 효과를 없애는 역행렬임을 noScaleMatrix와 동일한 originalAndInverseMatrix를 만듦으로써 보여 줍니다.
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 객체의 a, b, cd 속성을 변경합니다. 행렬 표기법에서 이것은 현재의 행렬을 다음에 연결하는 것과 같습니다.

Scale 메서드 매개 변수의 행렬 표기법

매개 변수

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 객체의 ad 속성을 변경합니다. 행렬 표기법에서 이것은 현재의 행렬을 다음 행렬에 연결하는 것과 같습니다.

Scale 메서드 매개 변수의 행렬 표기법

매개 변수

sx:Numberx 축을 따라 객체의 크기를 조절하는 데 사용되는 승수입니다.
 
sy:Numbery 축을 따라 객체의 크기를 조절하는 데 사용되는 승수입니다.

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 객체의 속성 값인 a, b, c, d, txty가 포함된 문자열입니다.

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

xy 축을 따라 dxdy 매개 변수에 지정된 대로 행렬을 평행 이동합니다.

매개 변수

dx:Numberx 축을 따라 오른쪽으로 이동할 크기(픽셀 단위)입니다.
 
dy:Numbery 축을 따라 아래쪽으로 이동할 크기(픽셀 단위)입니다.

MatrixExample.as

다음 예제에서는 MatrixExample 클래스를 사용하여 그래디언트 채우기가 적용된 큰 사각형을 만드는 방법을 보여 줍니다. 이는 다음 단계로 이루어집니다.
  1. 응용 프로그램에서 새 Matrix 객체 myMatrix를 만들고, trace() 메서드를 사용하여 myMatrix 객체에 대한 기본 속성 값을 출력합니다.
  2. 그런 다음 widthheight 매개 변수를 200픽셀로 설정하고, 회전 없이 x 축 및 y 축을 따라 평행 이동할 거리를 50 픽셀로 설정하여 createGradientBox()를 호출합니다.
  3. createGradientBox()를 호출한 다음에는 myMatrix 객체를 다시 인쇄하여 변경 사항을 보여 줍니다.
  4. 그래디언트 상자가 채워지는 방식을 제어하는 다음 세 가지 변수를 설정합니다.
    • colors: 그래디언트 색상을 단색 빨강과 단색 파랑 사이의 색상으로 설정합니다.
    • alphas: 불투명도를 단색으로 설정합니다.
    • ratios: 빨강 및 파랑에 동일하게 색상 배분을 설정합니다.
  5. 응용 프로그램에서는 graphics 메서드 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 클래스는 영어로 나타납니다.