Paket | spark.filters |
Sınıf | public class ColorMatrixFilter |
Miras Alma | ColorMatrixFilter ![]() ![]() ![]() |
Uygular | IBitmapFilter |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |

The <s:ColorMatrixFilter>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:ColorMatrixFilter Properties matrix="[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]" />
İlgili API Öğeleri
Genel Özellikler
Özellik | Tanımlayan: | ||
---|---|---|---|
![]() | constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | |
matrix : Object
A comma delimited list of 20 doubles that comprise a 4x5 matrix applied to the
rendered element. | ColorMatrixFilter |
Genel Yöntemler
Yöntem | Tanımlayan: | ||
---|---|---|---|
ColorMatrixFilter(matrix:Array = null)
Constructor. | ColorMatrixFilter | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder. | EventDispatcher | |
Returns a copy of this filter object. | ColorMatrixFilter | ||
![]() |
Olay akışına bir olay gönderir. | EventDispatcher | |
![]() |
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder. | EventDispatcher | |
![]() |
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | |
![]() |
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | |
![]() |
Propagates a change event when the filter has changed. | BaseFilter | |
![]() |
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | |
![]() |
EventDispatcher nesnesinden bir dinleyiciyi kaldırır. | EventDispatcher | |
![]() |
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | |
![]() |
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | |
![]() |
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | |
![]() |
Belirtilen nesnenin temel değerini döndürür. | Object | |
![]() |
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder. | EventDispatcher |
Olaylar
Özellik Ayrıntısı
matrix | özellik |
matrix:Object
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
A comma delimited list of 20 doubles that comprise a 4x5 matrix applied to the rendered element. The matrix is in row major order -- that is, the first five elements are multipled by the vector [srcR,srcG,srcB,srcA,1] to determine the output red value, the second five determine the output green value, etc.
The value must either be an array or comma delimited string of 20 numbers.
Varsayılan değer şudur [1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0].
Uygulama
public function get matrix():Object
public function set matrix(value:Object):void
Yapıcı Ayrıntı
ColorMatrixFilter | () | Yapıcı |
Yöntem Ayrıntısı
clone | () | yöntem |
public function clone():BitmapFilter
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Returns a copy of this filter object.
DöndürürBitmapFilter — A new ColorMatrixFilter instance with all of the same
properties as the original one.
|
Örnekler Bu örnek nasıl kullanılır?
ColorMatrixFilterExample.mxml
<?xml version="1.0"?> <!-- filters/examples/ColorMatrixFilterExample .mxml --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="createFilters()"> <fx:Script><![CDATA[ import spark.filters.*; import flash.filters.BitmapFilterQuality; import flash.filters.BitmapFilterType; private var myGreenMatrixFilter:ColorMatrixFilter; private var myBlueMatrixFilter:ColorMatrixFilter; private var myRedMatrixFilter:ColorMatrixFilter; public function createFilters():void { var greenMatrix:Array = new Array(); greenMatrix = greenMatrix.concat([0, 0, 0, 0, 0]); // red greenMatrix = greenMatrix.concat([0, 1, 0, 0, 0]); // green greenMatrix = greenMatrix.concat([0, 0, 0, 0, 0]); // blue greenMatrix = greenMatrix.concat([0, 0, 0, 1, 0]); // alpha var blueMatrix:Array = new Array(); blueMatrix = blueMatrix.concat([0, 0, 0, 0, 0]); // red blueMatrix = blueMatrix.concat([0, 0, 0, 0, 0]); // green blueMatrix = blueMatrix.concat([0, 0, 1, 0, 0]); // blue blueMatrix = blueMatrix.concat([0, 0, 0, 1, 0]); // alpha var redMatrix:Array = new Array(); redMatrix = redMatrix.concat([1, 0, 0, 0, 0]); // red redMatrix = redMatrix.concat([0, 0, 0, 0, 0]); // green redMatrix = redMatrix.concat([0, 0, 0, 0, 0]); // blue redMatrix = redMatrix.concat([0, 0, 0, 1, 0]); // alpha myGreenMatrixFilter = new ColorMatrixFilter(greenMatrix); myBlueMatrixFilter = new ColorMatrixFilter(blueMatrix); myRedMatrixFilter = new ColorMatrixFilter(redMatrix); greenImage.filters = [myGreenMatrixFilter]; blueImage.filters = [myBlueMatrixFilter]; redImage.filters = [myRedMatrixFilter]; } ]]></fx:Script> <s:VGroup> <s:VGroup> <s:Label text="Original Image"/> <mx:Image id="originalImage" source="@Embed(source='assets/Nokia_6630.png')"/> </s:VGroup> <s:VGroup> <s:Label text="Green Matrix Image"/> <mx:Image id="greenImage" source="@Embed(source='assets/Nokia_6630.png')"/> </s:VGroup> <s:VGroup> <s:Label text="Blue Matrix Image"/> <mx:Image id="blueImage" source="@Embed(source='assets/Nokia_6630.png')"/> </s:VGroup> <s:VGroup> <s:Label text="Red Matrix Image"/> <mx:Image id="redImage" source="@Embed(source='assets/Nokia_6630.png')"/> </s:VGroup> </s:VGroup> </s:Application>
Tue Jun 12 2018, 01:09 PM Z