Java Doc for CXForm.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » iv » flash » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » Laszlo 4.0.10 » org.openlaszlo.iv.flash.api 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.iv.flash.api.FlashItem
      org.openlaszlo.iv.flash.api.CXForm

CXForm
final public class CXForm extends FlashItem (Code)
Class defines a simple transform that can be applied to the color space of a graphic object.
There are two types of transform possible:

1. Multiplication Transforms
2. Addition Transforms

Multiplication transforms multiply the red, green, and blue components by an 8.8 fixed-point multiplication term. The fixed-point representation of 1.0 is 0x100 or 256 decimal. Therefore, the result of a multiplication operation should be divided by 256.

For any color (R,G,B,A) the transformed color (R', G', B', A') is calculated as follows:

R' = (R * RedMultTerm) / 256
G' = (G * GreenMultTerm) / 256
B' = (B * BlueMultTerm) / 256
A' = (A * AlphaMultTerm) / 256

Addition transforms simply add an addition term (positive or negative) to the red, green and blue components of the object being displayed. If the result is greater than 255, the result is clamped to 255. If the result is less than zero, the result is clamped to zero.

For any color (R,G,B,A) the transformed color (R', G', B', A') is calculated as follows:

R' = max(0, min(R + RedAddTerm, 255))
G' = max(0, min(G + GreenAddTerm, 255))
B' = max(0, min(B + BlueAddTerm, 255))
A' = max(0, min(A + AlphaAddTerm, 255))

Addition and Multiplication transforms can be combined as below. The multiplication operation is performed first.

R' = max(0, min(((R * RedMultTerm) / 256) + RedAddTerm, 255))
G' = max(0, min(((G * GreenMultTerm) / 256) + GreenAddTerm, 255))
B' = max(0, min(((B * BlueMultTerm) / 256) + BlueAddTerm, 255))
A' = max(0, min(((A * AlphaMultTerm) / 256) + AlphaAddTerm, 255))

author:
   Dmitry Skavish




Constructor Summary
public  CXForm()
    
public  CXForm(boolean withAlpha)
    

Method Summary
protected  FlashItemcopyInto(FlashItem item, ScriptCopier copier)
    
public  intgetAlphaAdd()
    
public  intgetAlphaMul()
    
public  intgetBlueAdd()
    
public  intgetBlueMul()
    
public  FlashItemgetCopy(ScriptCopier copier)
    
public  intgetGreenAdd()
    
public  intgetGreenMul()
    
public  intgetRedAdd()
    
public  intgetRedMul()
    
public static  CXForminterLinear(double t, CXForm c1, CXForm c2)
    
public static  CXFormnewAlpha(int alpha)
    
public static  CXFormnewBrightness(double f, boolean withAlpha)
    
public static  CXFormnewIdentity(boolean withAlpha)
    
public static  CXFormparse(Parser p, boolean withAlpha)
    
public  voidprintContent(PrintStream out, String indent)
    
public  voidsetAlphaAdd(int v)
    
public  voidsetAlphaMul(int v)
    
public  voidsetBlueAdd(int v)
    
public  voidsetBlueMul(int v)
    
public  voidsetGreenAdd(int v)
    
public  voidsetGreenMul(int v)
    
public  voidsetRedAdd(int v)
    
public  voidsetRedMul(int v)
    
public  voidsetWithAlpha(boolean withAlpha)
    
public  AlphaColortransform(AlphaColor color)
    
public  Colortransform(Color color)
    
public  voidwrite(FlashOutput fob)
    
final protected  voidwriteNoAlpha(FlashOutput fob)
    
final protected  voidwriteWithAlpha(FlashOutput fob)
    


Constructor Detail
CXForm
public CXForm()(Code)



CXForm
public CXForm(boolean withAlpha)(Code)
Creates color transformation
Parameters:
  withAlpha - if true creates transformation with alpha




Method Detail
copyInto
protected FlashItem copyInto(FlashItem item, ScriptCopier copier)(Code)



getAlphaAdd
public int getAlphaAdd()(Code)



getAlphaMul
public int getAlphaMul()(Code)



getBlueAdd
public int getBlueAdd()(Code)



getBlueMul
public int getBlueMul()(Code)



getCopy
public FlashItem getCopy(ScriptCopier copier)(Code)



getGreenAdd
public int getGreenAdd()(Code)



getGreenMul
public int getGreenMul()(Code)



getRedAdd
public int getRedAdd()(Code)



getRedMul
public int getRedMul()(Code)



interLinear
public static CXForm interLinear(double t, CXForm c1, CXForm c2)(Code)
Creates linear interpolation of the two specified transformation
Parameters:
  t - coefficient of the interpolation [0..1]
Parameters:
  c1 - first matrix
Parameters:
  c2 - second matrix interpolation of two specified matrixes



newAlpha
public static CXForm newAlpha(int alpha)(Code)
Creates transformation which being to applied to colors sets their alpha to specified value
Parameters:
  alpha - alpha in range 0..256 transformation with specified alpha



newBrightness
public static CXForm newBrightness(double f, boolean withAlpha)(Code)
Creates transformation which being applied to colors reduces or increases brightness
Parameters:
  f - value between -1.0 and 1.0
from -1 to 0 - reduce brightness
from 0 to 1 - increase brightness
Parameters:
  withAlpha - if true this transformation will be with alpha new transformation



newIdentity
public static CXForm newIdentity(boolean withAlpha)(Code)
Creates identity transformation (no tranformation at all)
Parameters:
  withAlpha - if true then create transformation with alpha default transformation



parse
public static CXForm parse(Parser p, boolean withAlpha)(Code)



printContent
public void printContent(PrintStream out, String indent)(Code)



setAlphaAdd
public void setAlphaAdd(int v)(Code)



setAlphaMul
public void setAlphaMul(int v)(Code)



setBlueAdd
public void setBlueAdd(int v)(Code)



setBlueMul
public void setBlueMul(int v)(Code)



setGreenAdd
public void setGreenAdd(int v)(Code)



setGreenMul
public void setGreenMul(int v)(Code)



setRedAdd
public void setRedAdd(int v)(Code)



setRedMul
public void setRedMul(int v)(Code)



setWithAlpha
public void setWithAlpha(boolean withAlpha)(Code)



transform
public AlphaColor transform(AlphaColor color)(Code)
Transforms specified color
Parameters:
  color - specified color to be transformed new transformed color



transform
public Color transform(Color color)(Code)
Transforms specified color
Parameters:
  color - specified color to be transformed new transformed color



write
public void write(FlashOutput fob)(Code)



writeNoAlpha
final protected void writeNoAlpha(FlashOutput fob)(Code)



writeWithAlpha
final protected void writeWithAlpha(FlashOutput fob)(Code)



Methods inherited from org.openlaszlo.iv.flash.api.FlashItem
protected FlashItem copyInto(FlashItem item, ScriptCopier copier)(Code)(Java Doc)
public FlashItem getCopy(ScriptCopier copier)(Code)(Java Doc)
abstract public void printContent(PrintStream out, String indent)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
abstract public void write(FlashOutput fob)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.