WebRadioApp  0.1
_GraphicsWarpMatrix.h
Go to the documentation of this file.
1 /*******************************************************************************
2 *
3 * E M B E D D E D W I Z A R D P R O J E C T
4 *
5 * Copyright (c) TARA Systems GmbH
6 * written by Paul Banach and Manfred Schweyer
7 *
8 ********************************************************************************
9 *
10 * This file was generated automatically by Embedded Wizard Studio.
11 *
12 * Please do not make any modifications of this file! The modifications are lost
13 * when the file is generated again by Embedded Wizard Studio!
14 *
15 * The template of this heading text can be found in the file 'head.ewt' in the
16 * directory 'Platforms' of your Embedded Wizard installation directory. If you
17 * wish to adapt this text, please copy the template file 'head.ewt' into your
18 * project directory and edit the copy only. Please avoid any modifications of
19 * the original template file!
20 *
21 * Version : 10.00
22 * Profile : STM32H747
23 * Platform : STM.STM32.RGB565
24 *
25 *******************************************************************************/
26 
27 #ifndef _GraphicsWarpMatrix_H
28 #define _GraphicsWarpMatrix_H
29 
30 #ifdef __cplusplus
31  extern "C"
32  {
33 #endif
34 
35 #include "ewrte.h"
36 #if EW_RTE_VERSION != 0x000A0000
37  #error Wrong version of Embedded Wizard Runtime Environment.
38 #endif
39 
40 #include "ewgfx.h"
41 #if EW_GFX_VERSION != 0x000A0000
42  #error Wrong version of Embedded Wizard Graphics Engine.
43 #endif
44 
45 /* Forward declaration of the class Graphics::WarpMatrix */
46 #ifndef _GraphicsWarpMatrix_
47  EW_DECLARE_CLASS( GraphicsWarpMatrix )
48 #define _GraphicsWarpMatrix_
49 #endif
50 
51 
52 /* The class Graphics::WarpMatrix provides the core functionality for all 2D and
53  3D transformations. With its aim, Views::WarpImage and Views::WarpGroup can be
54  translated, scaled and rotated around the X, Y and Z axis. Moreover, small 3D
55  scenes consisting of several warp views can be defined. This allows you to enrich
56  GUI components with fancy 3D effects. Please note, Embedded Wizard is not a 3D
57  GUI development tool! Its lightweight 3D functionality is limited to the perspectively
58  correct projection of a source image onto a four corners polygon lying in the
59  GUI component. The matrix coefficients describe thus the transformation of the
60  rectangular area of the source image into a four corners polygon.
61  To define the desired transformation the WarpMatrix class provides following
62  three methods @Translate(), @Scale() and @Rotate(). These can be combined together
63  in order to get more complex transformations. The source image can thus be rotated
64  and then e.g. translated in the 3D space. The order in which these operations
65  are executed is essential. Changing of the order may produce different results.
66  The methods @Push() and @Pop() are very useful to store and restore the current
67  state of the matrix on the matrix stack. This is important when 3D scenes are
68  composed of several transformed source images. In this manner one and the same
69  matrix is used for all warp views. To perform the transformation defined in the
70  matrix, pass it to the Warp3D() method provided by the WarpImage and WarpGroup
71  views. */
72 EW_DEFINE_FIELDS( GraphicsWarpMatrix, XObject )
73  EW_VARIABLE( M11, XFloat )
74  EW_VARIABLE( M12, XFloat )
75  EW_VARIABLE( M13, XFloat )
76  EW_VARIABLE( M14, XFloat )
77  EW_VARIABLE( M21, XFloat )
78  EW_VARIABLE( M22, XFloat )
79  EW_VARIABLE( M23, XFloat )
80  EW_VARIABLE( M24, XFloat )
81  EW_VARIABLE( M31, XFloat )
82  EW_VARIABLE( M32, XFloat )
83  EW_VARIABLE( M33, XFloat )
84  EW_VARIABLE( M34, XFloat )
85  EW_VARIABLE( M41, XFloat )
86  EW_VARIABLE( M42, XFloat )
87  EW_VARIABLE( M43, XFloat )
88  EW_VARIABLE( M44, XFloat )
89  EW_VARIABLE( Z, XFloat )
90  EW_VARIABLE( Y, XFloat )
91  EW_VARIABLE( X, XFloat )
92  EW_PROPERTY( EyeDistance, XFloat )
93  EW_VARIABLE( isIdentity, XBool )
94 EW_END_OF_FIELDS( GraphicsWarpMatrix )
95 
96 /* Virtual Method Table (VMT) for the class : 'Graphics::WarpMatrix' */
97 EW_DEFINE_METHODS( GraphicsWarpMatrix, XObject )
98 EW_END_OF_METHODS( GraphicsWarpMatrix )
99 
100 /* 'C' function for method : 'Graphics::WarpMatrix.CalculateZ()' */
101 XBool GraphicsWarpMatrix_CalculateZ( GraphicsWarpMatrix _this, XFloat aX, XFloat
102  aY );
103 
104 /* 'C' function for method : 'Graphics::WarpMatrix.Project()' */
105 XBool GraphicsWarpMatrix_Project( GraphicsWarpMatrix _this, XFloat aX, XFloat aY );
106 
107 /* The method Rotate() applies the given angles to the matrix. This corresponds
108  to the rotation of the source image around the X-, Y- and Z-axis. The angles
109  are specified in degrees. The method returns 'this' object to the caller. */
110 GraphicsWarpMatrix GraphicsWarpMatrix_Rotate( GraphicsWarpMatrix _this, XFloat aAngleX,
111  XFloat aAngleY, XFloat aAngleZ );
112 
113 /* The method Translate() applies the given displacement to the matrix. This corresponds
114  to the translation of the source image by the given values in the X-, Y- and
115  Z-direction. The method returns 'this' object to the caller. */
116 GraphicsWarpMatrix GraphicsWarpMatrix_Translate( GraphicsWarpMatrix _this, XFloat
117  aDeltaX, XFloat aDeltaY, XFloat aDeltaZ );
118 
119 /* 'C' function for method : 'Graphics::WarpMatrix.DeriveFromQuad()' */
120 GraphicsWarpMatrix GraphicsWarpMatrix_DeriveFromQuad( GraphicsWarpMatrix _this,
121  XFloat aX1, XFloat aY1, XFloat aX2, XFloat aY2, XFloat aX3, XFloat aY3, XFloat
122  aX4, XFloat aY4 );
123 
124 /* The method Assign() copies the coefficients of the given aMatrix into the own
125  coefficients. The method returns 'this' object to the caller. */
126 GraphicsWarpMatrix GraphicsWarpMatrix_Assign( GraphicsWarpMatrix _this, GraphicsWarpMatrix
127  aMatrix );
128 
129 #ifdef __cplusplus
130  }
131 #endif
132 
133 #endif /* _GraphicsWarpMatrix_H */
134 
135 /* Embedded Wizard */
GraphicsWarpMatrix_DeriveFromQuad
GraphicsWarpMatrix GraphicsWarpMatrix_DeriveFromQuad(GraphicsWarpMatrix _this, XFloat aX1, XFloat aY1, XFloat aX2, XFloat aY2, XFloat aX3, XFloat aY3, XFloat aX4, XFloat aY4)
Definition: Graphics.c:982
GraphicsWarpMatrix_Translate
GraphicsWarpMatrix GraphicsWarpMatrix_Translate(GraphicsWarpMatrix _this, XFloat aDeltaX, XFloat aDeltaY, XFloat aDeltaZ)
Definition: Graphics.c:966
ewrte.h
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
GraphicsWarpMatrix_CalculateZ
XBool GraphicsWarpMatrix_CalculateZ(GraphicsWarpMatrix _this, XFloat aX, XFloat aY)
Definition: Graphics.c:850
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
GraphicsWarpMatrix_Assign
GraphicsWarpMatrix GraphicsWarpMatrix_Assign(GraphicsWarpMatrix _this, GraphicsWarpMatrix aMatrix)
Definition: Graphics.c:1019
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
_obj_XObject
Definition: ewrte.h:281
GraphicsWarpMatrix_Project
XBool GraphicsWarpMatrix_Project(GraphicsWarpMatrix _this, XFloat aX, XFloat aY)
Definition: Graphics.c:864
XBool
char XBool
Definition: ewrte.h:1592
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
XFloat
float XFloat
Definition: ewrte.h:1595
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
GraphicsWarpMatrix_Rotate
GraphicsWarpMatrix GraphicsWarpMatrix_Rotate(GraphicsWarpMatrix _this, XFloat aAngleX, XFloat aAngleY, XFloat aAngleZ)
Definition: Graphics.c:904
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451