Interface Efl.Gfx.IMapping
Texture UV mapping for all objects (rotation, perspective, 3d, ...). Evas allows different transformations to be applied to all kinds of objects. These are applied by means of UV mapping.
With UV mapping, one maps points in the source object to a 3D space positioning at target. This allows rotation, perspective, scale and lots of other effects, depending on the map that is used.
Each map point may carry a multiplier color. If properly calculated, these can do shading effects on the object, producing 3D effects.
At the moment of writing, maps can only have 4 points (no more, no less). (Since EFL 1.22)
Syntax
public interface IMapping : IWrapper, IDisposable
Properties
MappingAlpha
Alpha flag for map rendering. This sets alpha flag for map rendering. If the object is a type that has its own alpha settings, then this will take precedence. Only image objects support this currently (Efl.Canvas.Image (object still in beta stage) and its friends). Setting this to off stops alpha blending of the map area, and is useful if you know the object and/or all sub-objects is 100% solid.
Note that this may conflict with Efl.Gfx.IMapping.MappingSmooth depending on which algorithm is used for anti-aliasing. (Since EFL 1.22)
Declaration
bool MappingAlpha { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MappingClockwise
Clockwise state of a map (read-only). This determines if the output points (X and Y. Z is not used) are clockwise or counter-clockwise. This can be used for "back-face culling". This is where you hide objects that "face away" from you. In this case objects that are not clockwise. (Since EFL 1.22)
Declaration
bool MappingClockwise { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MappingPointCount
Number of points of a map. This sets the number of points of map. Currently, the number of points must be multiples of 4. (Since EFL 1.22)
Declaration
int MappingPointCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of points of map |
MappingSmooth
Smoothing state for map rendering. This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off. By default smooth maps are enabled. (Since EFL 1.22)
Declaration
bool MappingSmooth { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
GetMappingAlpha()
Alpha flag for map rendering. This sets alpha flag for map rendering. If the object is a type that has its own alpha settings, then this will take precedence. Only image objects support this currently (Efl.Canvas.Image (object still in beta stage) and its friends). Setting this to off stops alpha blending of the map area, and is useful if you know the object and/or all sub-objects is 100% solid.
Note that this may conflict with Efl.Gfx.IMapping.MappingSmooth depending on which algorithm is used for anti-aliasing. (Since EFL 1.22)
Declaration
bool GetMappingAlpha()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetMappingClockwise()
Clockwise state of a map (read-only). This determines if the output points (X and Y. Z is not used) are clockwise or counter-clockwise. This can be used for "back-face culling". This is where you hide objects that "face away" from you. In this case objects that are not clockwise. (Since EFL 1.22)
Declaration
bool GetMappingClockwise()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetMappingColor(Int32, out Int32, out Int32, out Int32, out Int32)
Color of a vertex in the map. This sets the color of the vertex in the map. Colors will be linearly interpolated between vertex points through the map. Color will multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default color of a vertex in a map is white solid (255, 255, 255, 255) which means it will have no affect on modifying the texture pixels.
The color values must be premultiplied (ie. a
>= {r
, g
, b
}).
(Since EFL 1.22)
Declaration
void GetMappingColor(int idx, out int r, out int g, out int b, out int a)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). -1 can be used to set the color for all points, but it is invalid for get(). |
System.Int32 | r | Red (0 - 255) |
System.Int32 | g | Green (0 - 255) |
System.Int32 | b | Blue (0 - 255) |
System.Int32 | a | Alpha (0 - 255) |
GetMappingCoordAbsolute(Int32, out Double, out Double, out Double)
A point's absolute coordinate on the canvas. This sets/gets the fixed point's coordinate in the map. Note that points describe the outline of a quadrangle and are ordered either clockwise or counter-clockwise. Try to keep your quadrangles concave and non-complex. Though these polygon modes may work, they may not render a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2, 2 and 3, and 3 and 0 to describe the edges of the quadrangle.
The X and Y and Z coordinates are in canvas units. Z is optional and may or may not be honored in drawing. Z is a hint and does not affect the X and Y rendered coordinates. It may be used for calculating fills with perspective correct rendering.
Remember all coordinates are canvas global ones as with move and resize in the canvas.
This property can be read to get the 4 points positions on the canvas, or set to manually place them. (Since EFL 1.22)
Declaration
void GetMappingCoordAbsolute(int idx, out double x, out double y, out double z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). |
System.Double | x | Point X coordinate in absolute pixel coordinates. |
System.Double | y | Point Y coordinate in absolute pixel coordinates. |
System.Double | z | Point Z coordinate hint (pre-perspective transform). |
GetMappingPointCount()
Number of points of a map. This sets the number of points of map. Currently, the number of points must be multiples of 4. (Since EFL 1.22)
Declaration
int GetMappingPointCount()
Returns
Type | Description |
---|---|
System.Int32 | The number of points of map |
GetMappingSmooth()
Smoothing state for map rendering. This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off. By default smooth maps are enabled. (Since EFL 1.22)
Declaration
bool GetMappingSmooth()
Returns
Type | Description |
---|---|
System.Boolean |
|
GetMappingUv(Int32, out Double, out Double)
Map point's U and V texture source point. This sets/gets the U and V coordinates for the point. This determines which coordinate in the source image is mapped to the given point, much like OpenGL and textures. Valid values range from 0.0 to 1.0.
By default the points are set in a clockwise order, as such: - 0: top-left, i.e. (0.0, 0.0), - 1: top-right, i.e. (1.0, 0.0), - 2: bottom-right, i.e. (1.0, 1.0), - 3: bottom-left, i.e. (0.0, 1.0). (Since EFL 1.22)
Declaration
void GetMappingUv(int idx, out double u, out double v)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). |
System.Double | u | Relative X coordinate within the image, from 0 to 1. |
System.Double | v | Relative Y coordinate within the image, from 0 to 1. |
HasMapping()
Read-only property indicating whether an object is mapped.
This will be true
if any transformation is applied to this object.
(Since EFL 1.22)
Declaration
bool HasMapping()
Returns
Type | Description |
---|---|
System.Boolean |
|
Lighting3d(IEntity, Double, Double, Double, Int32, Int32, Int32, Int32, Int32, Int32)
Apply a lighting effect on the object. This is used to apply lighting calculations (from a single light source) to a given mapped object. The R, G and B values of each vertex will be modified to reflect the lighting based on the light point coordinates, the light color and the ambient color, and at what angle the map is facing the light source. A surface should have its points be declared in a clockwise fashion if the face is "facing" towards you (as opposed to away from you) as faces have a "logical" side for lighting.
The coordinates are set relative to the given pivot
object. If its geometry changes, then the absolute position of the rotation center will change accordingly. The Z position is absolute. If the pivot
is null
then this object will be its own pivot.
(Since EFL 1.22)
Declaration
void Lighting3d(IEntity pivot, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | pivot | A pivot object for the light point, can be |
System.Double | lx | X relative coordinate in space of light point. |
System.Double | ly | Y relative coordinate in space of light point. |
System.Double | lz | Z absolute coordinate in space of light point. |
System.Int32 | lr | Light red value (0 - 255). |
System.Int32 | lg | Light green value (0 - 255). |
System.Int32 | lb | Light blue value (0 - 255). |
System.Int32 | ar | Ambient color red value (0 - 255). |
System.Int32 | ag | Ambient color green value (0 - 255). |
System.Int32 | ab | Ambient color blue value (0 - 255). |
Lighting3dAbsolute(Double, Double, Double, Int32, Int32, Int32, Int32, Int32, Int32)
Apply a lighting effect to the object. This is used to apply lighting calculations (from a single light source) to a given mapped object. The RGB values of each vertex will be modified to reflect the lighting based on the light point coordinates, the light color, the ambient color and at what angle the map is facing the light source. A surface should have its points be declared in a clockwise fashion if the face is "facing" towards you (as opposed to away from you) as faces have a "logical" side for lighting.
The coordinates of the center point are given in absolute canvas coordinates. See also Efl.Gfx.IMapping.Lighting3d(Efl.Gfx.IEntity, System.Double, System.Double, System.Double, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32) for a pivot-based lighting effect. (Since EFL 1.22)
Declaration
void Lighting3dAbsolute(double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab)
Parameters
Type | Name | Description |
---|---|---|
System.Double | lx | X absolute coordinate in pixels of the light point. |
System.Double | ly | y absolute coordinate in pixels of the light point. |
System.Double | lz | Z absolute coordinate in space of light point. |
System.Int32 | lr | Light red value (0 - 255). |
System.Int32 | lg | Light green value (0 - 255). |
System.Int32 | lb | Light blue value (0 - 255). |
System.Int32 | ar | Ambient color red value (0 - 255). |
System.Int32 | ag | Ambient color green value (0 - 255). |
System.Int32 | ab | Ambient color blue value (0 - 255). |
Perspective3d(IEntity, Double, Double, Double, Double)
Apply a perspective transform to the map
This applies a given perspective (3D) to the map coordinates. X, Y and Z values are used. The px and py points specify the "infinite distance" point in the 3D conversion (where all lines converge to like when artists draw 3D by hand). The z0
value specifies the z value at which there is a 1:1 mapping between spatial coordinates and screen coordinates. Any points on this z value will not have their X and Y values modified in the transform. Those further away (Z value higher) will shrink into the distance, and those under this value will expand and become bigger. The foc
value determines the "focal length" of the camera. This is in reality the distance between the camera lens plane itself (at or closer than this rendering results are undefined) and the "z0" z value. This allows for some "depth" control and foc
must be greater than 0.
The coordinates are set relative to the given pivot
object. If its geometry changes, then the absolute position of the rotation center will change accordingly. The Z position is absolute. If the pivot
is null
then this object will be its own pivot.
(Since EFL 1.22)
Declaration
void Perspective3d(IEntity pivot, double px, double py, double z0, double foc)
Parameters
Type | Name | Description |
---|---|---|
Efl.Gfx.IEntity | pivot | A pivot object for the infinite point, can be |
System.Double | px | The perspective distance X relative coordinate. |
System.Double | py | The perspective distance Y relative coordinate. |
System.Double | z0 | The "0" Z plane value. |
System.Double | foc | The focal distance, must be greater than 0. |
Perspective3dAbsolute(Double, Double, Double, Double)
Apply a perspective transform to the map
This applies a given perspective (3D) to the map coordinates. X, Y and Z values are used. The px and py points specify the "infinite distance" point in the 3D conversion (where all lines converge to like when artists draw 3D by hand). The z0
value specifies the z value at which there is a 1:1 mapping between spatial coordinates and screen coordinates. Any points on this z value will not have their X and Y values modified in the transform. Those further away (Z value higher) will shrink into the distance, and those less than this value will expand and become bigger. The foc
value determines the "focal length" of the camera. This is in reality the distance between the camera lens plane itself (at or closer than this rendering results are undefined) and the "z0" z value. This allows for some "depth" control and foc
must be greater than 0.
The coordinates of the center point are given in absolute canvas coordinates. See also Efl.Gfx.IMapping.Perspective3d(Efl.Gfx.IEntity, System.Double, System.Double, System.Double, System.Double) for a pivot-based perspective effect. (Since EFL 1.22)
Declaration
void Perspective3dAbsolute(double px, double py, double z0, double foc)
Parameters
Type | Name | Description |
---|---|---|
System.Double | px | The perspective distance X relative coordinate. |
System.Double | py | The perspective distance Y relative coordinate. |
System.Double | z0 | The "0" Z plane value. |
System.Double | foc | The focal distance, must be greater than 0. |
ResetMapping()
Resets the map transformation to its default state.
This will reset all transformations to identity, meaning the points' colors, positions and UV coordinates will be reset to their default values. Efl.Gfx.IMapping.HasMapping() will then return false
. This function will not modify the values of Efl.Gfx.IMapping.MappingSmooth or Efl.Gfx.IMapping.MappingAlpha.
(Since EFL 1.22)
Declaration
void ResetMapping()
Rotate(Double, IEntity, Double, Double)
Apply a rotation to the object.
This rotates the object clockwise by degrees
degrees, around the center specified by the relative position (cx
, cy
) in the pivot
object. If pivot
is null
then this object is used as its own pivot center. 360 degrees is a full rotation, equivalent to no rotation. Negative values for degrees
will rotate clockwise by that amount.
The coordinates are set relative to the given pivot
object. If its geometry changes, then the absolute position of the rotation center will change accordingly.
By default, the center is at (0.5, 0.5). 0.0 means left or top while 1.0 means right or bottom of the pivot
object.
(Since EFL 1.22)
Declaration
void Rotate(double degrees, IEntity pivot, double cx, double cy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | degrees | CCW rotation in degrees. |
Efl.Gfx.IEntity | pivot | A pivot object for the center point, can be |
System.Double | cx | X relative coordinate of the center point. |
System.Double | cy | y relative coordinate of the center point. |
Rotate3d(Double, Double, Double, IEntity, Double, Double, Double)
Rotate the object around 3 axes in 3D. This will rotate in 3D, not just around the "Z" axis as is the case with Efl.Gfx.IMapping.Rotate(System.Double, Efl.Gfx.IEntity, System.Double, System.Double). You can rotate around the X, Y and Z axes. The Z axis points "into" the screen with low values at the screen and higher values further away. The X axis runs from left to right on the screen and the Y axis from top to bottom.
As with Efl.Gfx.IMapping.Rotate(System.Double, Efl.Gfx.IEntity, System.Double, System.Double), you provide a pivot and center point to rotate around (in 3D). The Z coordinate of this center point is an absolute value, and not a relative one like X and Y, as objects are flat in a 2D space. (Since EFL 1.22)
Declaration
void Rotate3d(double dx, double dy, double dz, IEntity pivot, double cx, double cy, double cz)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dx | Rotation in degrees around X axis (0 to 360). |
System.Double | dy | Rotation in degrees around Y axis (0 to 360). |
System.Double | dz | Rotation in degrees around Z axis (0 to 360). |
Efl.Gfx.IEntity | pivot | A pivot object for the center point, can be |
System.Double | cx | X relative coordinate of the center point. |
System.Double | cy | y relative coordinate of the center point. |
System.Double | cz | Z absolute coordinate of the center point. |
Rotate3dAbsolute(Double, Double, Double, Double, Double, Double)
Rotate the object around 3 axes in 3D, using absolute coordinates. This will rotate in 3D and not just around the "Z" axis as the case with Efl.Gfx.IMapping.Rotate(System.Double, Efl.Gfx.IEntity, System.Double, System.Double). This will rotate around the X, Y and Z axes. The Z axis points "into" the screen with low values at the screen and higher values further away. The X axis runs from left to right on the screen and the Y axis from top to bottom.
The coordinates of the center point are given in absolute canvas coordinates. See also Efl.Gfx.IMapping.Rotate3d(System.Double, System.Double, System.Double, Efl.Gfx.IEntity, System.Double, System.Double, System.Double) for a pivot-based 3D rotation. (Since EFL 1.22)
Declaration
void Rotate3dAbsolute(double dx, double dy, double dz, double cx, double cy, double cz)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dx | Rotation in degrees around X axis (0 to 360). |
System.Double | dy | Rotation in degrees around Y axis (0 to 360). |
System.Double | dz | Rotation in degrees around Z axis (0 to 360). |
System.Double | cx | X absolute coordinate in pixels of the center point. |
System.Double | cy | y absolute coordinate in pixels of the center point. |
System.Double | cz | Z absolute coordinate of the center point. |
RotateAbsolute(Double, Double, Double)
Apply a rotation to the object, using absolute coordinates.
This rotates the object clockwise by degrees
degrees, around the center specified by the relative position (cx
, cy
) in the pivot
object. If pivot
is null
then this object is used as its own pivot center. 360 degrees is a full rotation, equivalent to no rotation. Negative values for degrees
will rotate clockwise by that amount.
The given coordinates are absolute values in pixels. See also Efl.Gfx.IMapping.Rotate(System.Double, Efl.Gfx.IEntity, System.Double, System.Double) for a relative coordinate version. (Since EFL 1.22)
Declaration
void RotateAbsolute(double degrees, double cx, double cy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | degrees | CCW rotation in degrees. |
System.Double | cx | X absolute coordinate in pixels of the center point. |
System.Double | cy | y absolute coordinate in pixels of the center point. |
RotateQuat(Double, Double, Double, Double, IEntity, Double, Double, Double)
Rotate the object in 3D using a unit quaternion. This is similar to Efl.Gfx.IMapping.Rotate3d(System.Double, System.Double, System.Double, Efl.Gfx.IEntity, System.Double, System.Double, System.Double) but uses a unit quaternion (also known as versor) rather than a direct angle-based rotation around a center point. Use this to avoid gimbal locks.
As with Efl.Gfx.IMapping.Rotate(System.Double, Efl.Gfx.IEntity, System.Double, System.Double), you provide a pivot and center point to rotate around (in 3D). The Z coordinate of this center point is an absolute value, and not a relative one like X and Y, as objects are flat in a 2D space. (Since EFL 1.22)
Declaration
void RotateQuat(double qx, double qy, double qz, double qw, IEntity pivot, double cx, double cy, double cz)
Parameters
Type | Name | Description |
---|---|---|
System.Double | qx | The x component of the imaginary part of the quaternion. |
System.Double | qy | The y component of the imaginary part of the quaternion. |
System.Double | qz | The z component of the imaginary part of the quaternion. |
System.Double | qw | The w component of the real part of the quaternion. |
Efl.Gfx.IEntity | pivot | A pivot object for the center point, can be |
System.Double | cx | X relative coordinate of the center point. |
System.Double | cy | y relative coordinate of the center point. |
System.Double | cz | Z absolute coordinate of the center point. |
RotateQuatAbsolute(Double, Double, Double, Double, Double, Double, Double)
Rotate the object in 3D using a unit quaternion, using absolute coordinates. This is similar to Efl.Gfx.IMapping.Rotate3d(System.Double, System.Double, System.Double, Efl.Gfx.IEntity, System.Double, System.Double, System.Double) but uses a unit quaternion (also known as versor) rather than a direct angle-based rotation around a center point. Use this to avoid gimbal locks.
The coordinates of the center point are given in absolute canvas coordinates. See also Efl.Gfx.IMapping.RotateQuat(System.Double, System.Double, System.Double, System.Double, Efl.Gfx.IEntity, System.Double, System.Double, System.Double) for a pivot-based 3D rotation. (Since EFL 1.22)
Declaration
void RotateQuatAbsolute(double qx, double qy, double qz, double qw, double cx, double cy, double cz)
Parameters
Type | Name | Description |
---|---|---|
System.Double | qx | The x component of the imaginary part of the quaternion. |
System.Double | qy | The y component of the imaginary part of the quaternion. |
System.Double | qz | The z component of the imaginary part of the quaternion. |
System.Double | qw | The w component of the real part of the quaternion. |
System.Double | cx | X absolute coordinate in pixels of the center point. |
System.Double | cy | y absolute coordinate in pixels of the center point. |
System.Double | cz | Z absolute coordinate of the center point. |
SetMappingAlpha(Boolean)
Alpha flag for map rendering. This sets alpha flag for map rendering. If the object is a type that has its own alpha settings, then this will take precedence. Only image objects support this currently (Efl.Canvas.Image (object still in beta stage) and its friends). Setting this to off stops alpha blending of the map area, and is useful if you know the object and/or all sub-objects is 100% solid.
Note that this may conflict with Efl.Gfx.IMapping.MappingSmooth depending on which algorithm is used for anti-aliasing. (Since EFL 1.22)
Declaration
void SetMappingAlpha(bool alpha)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | alpha |
|
SetMappingColor(Int32, Int32, Int32, Int32, Int32)
Color of a vertex in the map. This sets the color of the vertex in the map. Colors will be linearly interpolated between vertex points through the map. Color will multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default color of a vertex in a map is white solid (255, 255, 255, 255) which means it will have no affect on modifying the texture pixels.
The color values must be premultiplied (ie. a
>= {r
, g
, b
}).
(Since EFL 1.22)
Declaration
void SetMappingColor(int idx, int r, int g, int b, int a)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). -1 can be used to set the color for all points, but it is invalid for get(). |
System.Int32 | r | Red (0 - 255) |
System.Int32 | g | Green (0 - 255) |
System.Int32 | b | Blue (0 - 255) |
System.Int32 | a | Alpha (0 - 255) |
SetMappingCoordAbsolute(Int32, Double, Double, Double)
A point's absolute coordinate on the canvas. This sets/gets the fixed point's coordinate in the map. Note that points describe the outline of a quadrangle and are ordered either clockwise or counter-clockwise. Try to keep your quadrangles concave and non-complex. Though these polygon modes may work, they may not render a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2, 2 and 3, and 3 and 0 to describe the edges of the quadrangle.
The X and Y and Z coordinates are in canvas units. Z is optional and may or may not be honored in drawing. Z is a hint and does not affect the X and Y rendered coordinates. It may be used for calculating fills with perspective correct rendering.
Remember all coordinates are canvas global ones as with move and resize in the canvas.
This property can be read to get the 4 points positions on the canvas, or set to manually place them. (Since EFL 1.22)
Declaration
void SetMappingCoordAbsolute(int idx, double x, double y, double z)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). |
System.Double | x | Point X coordinate in absolute pixel coordinates. |
System.Double | y | Point Y coordinate in absolute pixel coordinates. |
System.Double | z | Point Z coordinate hint (pre-perspective transform). |
SetMappingPointCount(Int32)
Number of points of a map. This sets the number of points of map. Currently, the number of points must be multiples of 4. (Since EFL 1.22)
Declaration
void SetMappingPointCount(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | The number of points of map |
SetMappingSmooth(Boolean)
Smoothing state for map rendering. This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off. By default smooth maps are enabled. (Since EFL 1.22)
Declaration
void SetMappingSmooth(bool smooth)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | smooth |
|
SetMappingUv(Int32, Double, Double)
Map point's U and V texture source point. This sets/gets the U and V coordinates for the point. This determines which coordinate in the source image is mapped to the given point, much like OpenGL and textures. Valid values range from 0.0 to 1.0.
By default the points are set in a clockwise order, as such: - 0: top-left, i.e. (0.0, 0.0), - 1: top-right, i.e. (1.0, 0.0), - 2: bottom-right, i.e. (1.0, 1.0), - 3: bottom-left, i.e. (0.0, 1.0). (Since EFL 1.22)
Declaration
void SetMappingUv(int idx, double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | ID of the point, from 0 to 3 (included). |
System.Double | u | Relative X coordinate within the image, from 0 to 1. |
System.Double | v | Relative Y coordinate within the image, from 0 to 1. |
Translate(Double, Double, Double)
Apply a translation to the object using map. This does not change the real geometry of the object but will affect its visible position. (Since EFL 1.22)
Declaration
void Translate(double dx, double dy, double dz)
Parameters
Type | Name | Description |
---|---|---|
System.Double | dx | Distance in pixels along the X axis. |
System.Double | dy | Distance in pixels along the Y axis. |
System.Double | dz | Distance in pixels along the Z axis. |
Zoom(Double, Double, IEntity, Double, Double)
Apply a zoom to the object.
This zooms the points of the map from a center point. That center is defined by cx
and cy
. The zoomx
and zoomy
parameters specify how much to zoom in the X and Y direction respectively. A value of 1.0 means "don't zoom". 2.0 means "double the size". 0.5 is "half the size" etc.
By default, the center is at (0.5, 0.5). 0.0 means left or top while 1.0 means right or bottom. (Since EFL 1.22)
Declaration
void Zoom(double zoomx, double zoomy, IEntity pivot, double cx, double cy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | zoomx | Zoom in X direction |
System.Double | zoomy | Zoom in Y direction |
Efl.Gfx.IEntity | pivot | A pivot object for the center point, can be |
System.Double | cx | X relative coordinate of the center point. |
System.Double | cy | y relative coordinate of the center point. |
ZoomAbsolute(Double, Double, Double, Double)
Apply a zoom to the object, using absolute coordinates.
This zooms the points of the map from a center point. That center is defined by cx
and cy
. The zoomx
and zoomy
parameters specify how much to zoom in the X and Y direction respectively. A value of 1.0 means "don't zoom". 2.0 means "double the size". 0.5 is "half the size" etc.
The coordinates of the center point are given in absolute canvas coordinates. See also Efl.Gfx.IMapping.Zoom(System.Double, System.Double, Efl.Gfx.IEntity, System.Double, System.Double) for a pivot-based zoom. (Since EFL 1.22)
Declaration
void ZoomAbsolute(double zoomx, double zoomy, double cx, double cy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | zoomx | Zoom in X direction |
System.Double | zoomy | Zoom in Y direction |
System.Double | cx | X absolute coordinate in pixels of the center point. |
System.Double | cy | y absolute coordinate in pixels of the center point. |