/// (configured to have the origin of the coordinate system at the top-left corner of the screen, and unit 1 as 1 pixel of the screen). This is a typical way.<br>
/// - For 3D applications, you can change the view by manipulating the camera.You can translate or rotate the camera in this case.<br>
/// Note that the top-left corner of the screen and unit 1 no longer are (0,0,0) and 1 pixel after manipulating the camera.<br>
- /// There are two types of camera actor, FreeLook and LookAtTarget By default, the camera actor will be FreeLook.<br>
+ /// There are two types of camera actor, FreeLook and LookAtTarget. By default, the camera actor will be FreeLook.<br>
/// - A FreeLook camera uses actor's orientation to control where the camera is looking.<br>
/// If no additional rotations are specified, the camera looks in the negative Z direction.<br>
/// - For LookAtTarget, the actor's orientation is ignored, instead the camera looks at TargetPosition in world coordinates.<br>
/// <summary>
/// Gets/Sets the camera type. The default type is FreeLook
/// </summary>
- public string Type
+ public CameraType Type
{
get
{
string temp;
- GetProperty(CameraActor.Property.TYPE).Get(out temp);
- return temp;
+ if (GetProperty(CameraActor.Property.TYPE).Get(out temp) == false)
+ {
+ //Tizen.Log.Error("NUI", "CameraType get error!");
+ }
+ switch (temp)
+ {
+ case "LOOK_AT_TARGET":
+ return CameraType.LookAtTarget;
+ case "FREE_LOOK":
+ return CameraType.FreeLook;
+ default:
+ return CameraType.FreeLook;
+ }
}
set
{
- SetProperty(CameraActor.Property.TYPE, new Tizen.NUI.PropertyValue(value));
+ string valueToString = "";
+ switch (value)
+ {
+ case CameraType.LookAtTarget:
+ {
+ valueToString = "LOOK_AT_TARGET";
+ break;
+ }
+ case CameraType.FreeLook:
+ {
+ valueToString = "FREE_LOOK";
+ break;
+ }
+ default:
+ {
+ valueToString = "FREE_LOOK";
+ break;
+ }
+ }
+ SetProperty(CameraActor.Property.TYPE, new Tizen.NUI.PropertyValue(valueToString));
}
}
/// <summary>
/// Gets/Sets the projection mode.
/// </summary>
- public string ProjectionMode
+ public ProjectionMode ProjectionMode
{
get
{
string temp;
- GetProperty(CameraActor.Property.PROJECTION_MODE).Get(out temp);
- return temp;
+ if (GetProperty(CameraActor.Property.PROJECTION_MODE).Get(out temp) == false)
+ {
+ //Tizen.Log.Error("NUI", "ProjectionMode get error!");
+ }
+ switch(temp)
+ {
+ case "PERSPECTIVE_PROJECTION":
+ return ProjectionMode.PerspectiveProjection;
+ case "ORTHOGRAPHIC_PROJECTION":
+ return ProjectionMode.OrthographicProjection;
+ default:
+ return ProjectionMode.PerspectiveProjection;
+ }
}
set
{
- SetProperty(CameraActor.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(value));
+ string valueToString = "";
+ switch (value)
+ {
+ case ProjectionMode.PerspectiveProjection:
+ {
+ valueToString = "PERSPECTIVE_PROJECTION";
+ break;
+ }
+ case ProjectionMode.OrthographicProjection:
+ {
+ valueToString = "ORTHOGRAPHIC_PROJECTION";
+ break;
+ }
+ default:
+ {
+ valueToString = "PERSPECTIVE_PROJECTION";
+ break;
+ }
+ }
+ SetProperty(CameraActor.Property.PROJECTION_MODE, new Tizen.NUI.PropertyValue(valueToString));
}
}
}
/// <summary>
- /// Enumeration for type determination of how camera operates.<br>
- /// FreeLook : Camera orientation is taken from CameraActor.<br>
- /// LookAtTarget : Camera is oriented to always look at a target.<br>
+ /// Enumeration for type determination of how camera operates.
/// </summary>
public enum CameraType
{
+ /// <summary>
+ /// Camera orientation is taken from CameraActor.
+ /// </summary>
FreeLook,
+ /// <summary>
+ /// Camera is oriented to always look at a target.
+ /// </summary>
LookAtTarget
}
/// <summary>
- /// Enumeration for projection modes.<br>
- /// PerspectiveProjection : Distance causes foreshortening; objects further from the camera appear smaller.<br>
- /// OrthographicProjection : Relative distance from the camera does not affect the size of objects.<br>
+ /// Enumeration for projection modes.
/// </summary>
public enum ProjectionMode
{
+ /// <summary>
+ /// Distance causes foreshortening; objects further from the camera appear smaller.
+ /// </summary>
PerspectiveProjection,
+ /// <summary>
+ /// Relative distance from the camera does not affect the size of objects.
+ /// </summary>
OrthographicProjection
}
/// <summary>
- /// Describes the direction to move the keyboard focus towards.
+ /// Describes the direction to move the focus towards.
/// </summary>
public enum FocusDirection
{
/// <summary>
/// The current state of the view.
/// </summary>
- public string State
+ public States State
{
get
{
int temp = 0;
- GetProperty(View.Property.STATE).Get(ref temp);
+ if (GetProperty(View.Property.STATE).Get(ref temp) == false)
+ {
+ //Tizen.Log.Error("NUI", "State get error!");
+ }
switch (temp)
{
case 0:
{
- return "NORMAL";
+ return States.Normal;
}
case 1:
{
- return "FOCUSED";
+ return States.Focused;
}
case 2:
{
- return "DISABLED";
+ return States.Disabled;
}
default:
{
- return "";
+ return States.Normal;
}
}
}
set
{
- SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue(value));
+ SetProperty(View.Property.STATE, new Tizen.NUI.PropertyValue((int)value));
}
}
/// <summary>
/// The current sub state of the view.
/// </summary>
- public string SubState
+ public States SubState
{
get
{
string temp;
- GetProperty(View.Property.SUB_STATE).Get(out temp);
- return temp;
+ if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
+ {
+ //Tizen.Log.Error("NUI", "subState get error!");
+ }
+ switch (temp)
+ {
+ case "NORMAL":
+ return States.Normal;
+ case "FOCUSED":
+ return States.Focused;
+ case "DISABLED":
+ return States.Disabled;
+ default:
+ return States.Normal;
+ }
}
set
{
- SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(value));
+ string valueToString = "";
+ switch (value)
+ {
+ case States.Normal:
+ {
+ valueToString = "NORMAL";
+ break;
+ }
+ case States.Focused:
+ {
+ valueToString = "FOCUSED";
+ break;
+ }
+ case States.Disabled:
+ {
+ valueToString = "DISABLED";
+ break;
+ }
+ default:
+ {
+ valueToString = "NORMAL";
+ break;
+ }
+ }
+ SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
}
}
/// <summary>
/// The horizontal alignment of this child inside the cells, if not set, default value is 'left'
/// </summary>
- public string CellHorizontalAlignment
+ public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
{
get
{
string temp;
- GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp);
- return temp;
+ if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
+ {
+ //Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
+ }
+
+ switch (temp)
+ {
+ case "left":
+ return Tizen.NUI.HorizontalAlignmentType.Left;
+ case "center":
+ return Tizen.NUI.HorizontalAlignmentType.Center;
+ case "right":
+ return Tizen.NUI.HorizontalAlignmentType.Right;
+ default:
+ return Tizen.NUI.HorizontalAlignmentType.Left;
+ }
}
set
{
- SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(value));
+ string valueToString = "";
+ switch (value)
+ {
+ case Tizen.NUI.HorizontalAlignmentType.Left:
+ {
+ valueToString = "left";
+ break;
+ }
+ case Tizen.NUI.HorizontalAlignmentType.Center:
+ {
+ valueToString = "center";
+ break;
+ }
+ case Tizen.NUI.HorizontalAlignmentType.Right:
+ {
+ valueToString = "right";
+ break;
+ }
+ default:
+ {
+ valueToString = "left";
+ break;
+ }
+ }
+ SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
}
}
/// <summary>
/// The vertical alignment of this child inside the cells, if not set, default value is 'top'
/// </summary>
- public string CellVerticalAlignment
+ public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
{
get
{
string temp;
GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
- return temp;
+ {
+ //Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
+ }
+
+ switch (temp)
+ {
+ case "top":
+ return Tizen.NUI.VerticalAlignmentType.Top;
+ case "center":
+ return Tizen.NUI.VerticalAlignmentType.Center;
+ case "bottom":
+ return Tizen.NUI.VerticalAlignmentType.Bottom;
+ default:
+ return Tizen.NUI.VerticalAlignmentType.Top;
+ }
}
set
{
- SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(value));
+ string valueToString = "";
+ switch (value)
+ {
+ case Tizen.NUI.VerticalAlignmentType.Top:
+ {
+ valueToString = "top";
+ break;
+ }
+ case Tizen.NUI.VerticalAlignmentType.Center:
+ {
+ valueToString = "center";
+ break;
+ }
+ case Tizen.NUI.VerticalAlignmentType.Bottom:
+ {
+ valueToString = "bottom";
+ break;
+ }
+ default:
+ {
+ valueToString = "top";
+ break;
+ }
+ }
+ SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
}
}
}
}
+ /// <summary>
+ /// Enumeration for describing the states of view.
+ /// </summary>
+ public enum States
+ {
+ /// <summary>
+ /// Normal state
+ /// </summary>
+ Normal,
+ /// <summary>
+ /// Focused state
+ /// </summary>
+ Focused,
+ /// <summary>
+ /// Disabled state
+ /// </summary>
+ Disabled
+ }
}
}
private float _depthIndex = 0.0f;
protected PropertyMap _outputVisualMap = null;
+
internal string Name
{
set;
}
}
+ protected PropertyMap _shader = null;
+ //private PropertyMap _transform = null;
+ protected bool? _premultipliedAlpha = null;
+ protected Color _mixColor = null;
+ protected float? _opacity = null;
+ protected PropertyMap _commonlyUsedMap = null;
+
+ /// <summary>
+ /// The shader to use in the visual.
+ /// </summary>
+ public PropertyMap Shader
+ {
+ get
+ {
+ return _shader;
+ }
+ set
+ {
+ _shader = value;
+ UpdateVisual();
+ }
+ }
+ /// <summary>
+ /// Enables/disables premultiplied alpha. <br>
+ /// The premultiplied alpha is false by default unless this behaviour is modified by the derived Visual type.
+ /// </summary>
+ public bool PremultipliedAlpha
+ {
+ get
+ {
+ return _premultipliedAlpha??false;
+ }
+ set
+ {
+ _premultipliedAlpha = value;
+ UpdateVisual();
+ }
+ }
+ /// <summary>
+ /// Mix color is a blend color for any visual.
+ /// </summary>
+ public Color MixColor
+ {
+ get
+ {
+ return _mixColor;
+ }
+ set
+ {
+ _mixColor = value;
+ UpdateVisual();
+ }
+ }
+ /// <summary>
+ /// Opacity is the alpha component of the mixColor, above.
+ /// </summary>
+ public float Opacity
+ {
+ get
+ {
+ return _opacity??(-1.0f);
+ }
+ set
+ {
+ _opacity = value;
+ UpdateVisual();
+ }
+ }
+
}
/// <summary>
if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); }
if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); }
if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
-
}
/// <summary>
/// Get or set the line horizontal alignment.<br>
/// If not specified, the default is BEGIN.<br>
/// </summary>
- public string HorizontalAlignment
+ public Tizen.NUI.Constants.HorizontalAlignment HorizontalAlignment
{
get
{
- return _horizontalAlignment;
+ switch (_horizontalAlignment)
+ {
+ case "BEGIN":
+ return Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignBegin;
+ case "CENTER":
+ return Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignCenter;
+ case "END":
+ return Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignEnd;
+ default:
+ return Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignBegin;
+ }
}
set
{
- _horizontalAlignment = value;
+ switch (value)
+ {
+ case Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignBegin:
+ {
+ _horizontalAlignment = "BEGIN";
+ break;
+ }
+ case Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignCenter:
+ {
+ _horizontalAlignment = "CENTER";
+ break;
+ }
+ case Tizen.NUI.Constants.HorizontalAlignment.HorizontalAlignEnd:
+ {
+ _horizontalAlignment = "END";
+ break;
+ }
+ default:
+ {
+ _horizontalAlignment = "BEGIN";
+ break;
+ }
+ }
UpdateVisual();
}
}
/// Get or set the line vertical alignment.<br>
/// If not specified, the default is TOP.<br>
/// </summary>
- public string VerticalAlignment
+ public Tizen.NUI.Constants.VerticalAlignment VerticalAlignment
{
get
{
- return _verticalAlignment;
+ switch (_verticalAlignment)
+ {
+ case "TOP":
+ return Tizen.NUI.Constants.VerticalAlignment.VerticalAlignTop;
+ case "CENTER":
+ return Tizen.NUI.Constants.VerticalAlignment.VerticalAlignCenter;
+ case "BOTTOM":
+ return Tizen.NUI.Constants.VerticalAlignment.VerticalAlignBottom;
+ default:
+ return Tizen.NUI.Constants.VerticalAlignment.VerticalAlignBottom;
+ }
}
set
{
- _verticalAlignment = value;
+ switch (value)
+ {
+ case Tizen.NUI.Constants.VerticalAlignment.VerticalAlignTop:
+ {
+ _verticalAlignment = "TOP";
+ break;
+ }
+ case Tizen.NUI.Constants.VerticalAlignment.VerticalAlignCenter:
+ {
+ _verticalAlignment = "CENTER";
+ break;
+ }
+ case Tizen.NUI.Constants.VerticalAlignment.VerticalAlignBottom:
+ {
+ _verticalAlignment = "BOTTOM";
+ break;
+ }
+ default:
+ {
+ _verticalAlignment = "TOP";
+ break;
+ }
+ }
UpdateVisual();
}
}
if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); }
if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); }
if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
if (_color != null) { _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color)); }
if (_size != null) { _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size)); }
if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
{
}
- private Color _mixColor = null;
+ private Color _mixColorForColorVisual = null;
/// <summary>
/// Get or set the solid color required.
/// </summary>
- public Color MixColor
+ public Color Color
{
get
{
- return _mixColor;
+ return _mixColorForColorVisual;
}
set
{
- _mixColor = value;
+ _mixColorForColorVisual = value;
UpdateVisual();
}
}
{
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
- if (_mixColor != null) { _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColor)); }
+ if (_mixColorForColorVisual != null) { _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
if (_stopColor != null) { _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor)); }
if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); }
if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); }
if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); }
if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+
}
}
}
private PrimitiveVisualShapeType? _shape = null;
- private Color _mixColor = null;
+ private Color _mixColorForPrimitiveVisual = null;
private int? _slices = null;
private int? _stacks = null;
private float? _scaleTopRadius = null;
{
get
{
- return _mixColor;
+ return _mixColorForPrimitiveVisual;
}
set
{
- _mixColor = value;
+ _mixColorForPrimitiveVisual = value;
UpdateVisual();
}
}
_outputVisualMap = new PropertyMap(); ;
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Primitive));
if (_shape != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Shape, new PropertyValue((int)_shape)); }
- if (_mixColor != null) { _outputVisualMap.Add(PrimitiveVisualProperty.MixColor, new PropertyValue(_mixColor)); }
+ if (_mixColorForPrimitiveVisual != null) { _outputVisualMap.Add(PrimitiveVisualProperty.MixColor, new PropertyValue(_mixColorForPrimitiveVisual)); }
if (_slices != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Slices, new PropertyValue((int)_slices)); }
if (_stacks != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Stacks, new PropertyValue((int)_stacks)); }
if (_scaleTopRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleTopRadius, new PropertyValue((float)_scaleTopRadius)); }
if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); }
if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); }
if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
if (_url != null) { _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url)); }
if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
+
}
}
/// <summary>
- /// This specifies wrap mode types
+ /// This specifies wrap mode types <br>
+ /// WrapModeU and WrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0.
/// </summary>
public enum WrapModeType
{
+ /// <summary>
+ /// Defualt value
+ /// </summary>
Default = 0,
+ /// <summary>
+ /// Clamp to edge
+ /// </summary>
ClampToEdge,
+ /// <summary>
+ /// Repeat
+ /// </summary>
Repeat,
+ /// <summary>
+ /// Mirrored repeat
+ /// </summary>
MirroredRepeat
}
/// <summary>
- /// This specifies all kind os types of coordinate system for certain attributes of the points in a gradient.
+ /// The type of coordinate system for certain attributes of the points in a gradient.
/// </summary>
public enum GradientVisualUnitsType
{
+ /// <summary>
+ /// Uses the normals for the start, end & center points, i.e. top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5).
+ /// </summary>
ObjectBoundingBox,
+ /// <summary>
+ /// Uses the user coordinates for the start, end & center points, i.e. in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200).
+ /// </summary>
UserSpace
}
/// </summary>
public enum GradientVisualSpreadMethodType
{
+ /// <summary>
+ /// Uses the terminal colors of the gradient to fill the remainder of the quad.
+ /// </summary>
Pad,
+ /// <summary>
+ /// Reflect the gradient pattern start-to-end, end-to-start, start-to-end etc. until the quad is filled.
+ /// </summary>
Reflect,
+ /// <summary>
+ /// Repeat the gradient pattern start-to-end, start-to-end, start-to-end etc. until the quad is filled.
+ /// </summary>
Repeat
}
/// <summary>
- /// This specifies shading mode types.
+ /// The shading mode used by MeshVisual.
/// </summary>
public enum MeshVisualShadingModeValue
{
+ /// <summary>
+ /// *Simplest*. One color that is lit by ambient and diffuse lighting.
+ /// </summary>
TexturelessWithDiffuseLighting,
+ /// <summary>
+ /// Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting.
+ /// </summary>
TexturedWithSpecularLighting,
+ /// <summary>
+ /// Uses all textures provided including a gloss, normal and texture map along with specular, ambient and diffuse lighting.
+ /// </summary>
TexturedWithDetailedSpecularLighting
}
/// <summary>
- /// This specifies shape types.
+ /// The primitive shape to render as a PrimitiveVisual.
/// </summary>
public enum PrimitiveVisualShapeType
{
+ /// <summary>
+ /// A perfectly round geometrical object in three-dimensional space.
+ /// </summary>
Sphere,
+ /// <summary>
+ /// The area bound between two circles, i.e. a cone with the tip removed.
+ /// </summary>
ConicalFrustrum,
+ /// <summary>
+ /// Equivalent to a conical frustrum with top radius of zero.
+ /// </summary>Equivalent to a conical frustrum with top radius of zero.
Cone,
+ /// <summary>
+ /// Equivalent to a conical frustrum with top radius of zero.
+ /// </summary>
Cylinder,
+ /// <summary>
+ /// Equivalent to a conical frustrum with equal radii for the top and bottom circles.
+ /// </summary>
Cube,
+ /// <summary>
+ /// Equivalent to a bevelled cube with a bevel percentage of zero.
+ /// </summary>
Octahedron,
+ /// <summary>
+ /// Equivalent to a bevelled cube with a bevel percentage of one.
+ /// </summary>
BevelledCube
}
/// </summary>
public enum FittingModeType
{
+ /// <summary>
+ /// Full-screen image display: Limit loaded image resolution to device resolution using ShrinkToFit mode.
+ /// </summary>
ShrinkToFit,
+ /// <summary>
+ /// Thumbnail gallery grid: Limit loaded image resolution to screen tile using ScaleToFill mode.
+ /// </summary>
ScaleToFill,
+ /// <summary>
+ /// Image columns: Limit loaded image resolution to column width using FitWidth mode.
+ /// </summary>
FitWidth,
+ /// <summary>
+ /// Image rows: Limit loaded image resolution to row height using FitHeight mode.
+ /// </summary>
FitHeight
}
/// <summary>
/// This specifies sampling mode types. Filtering options, used when resizing images to sample original pixels.<br>
/// A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during a scaling.<br>
- /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and FittingMode,
+ /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and FittingMode,<br>
/// but all other filter modes do if the desired dimensions are `<=` the raw dimensions of the input image file.<br>
/// </summary>
public enum SamplingModeType
{
+ /// <summary>
+ /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc width and height and approximately the desired size. <br>
+ /// This is the default.
+ /// </summary>
Box,
+ /// <summary>
+ /// For each output pixel, read one input pixel.
+ /// </summary>
Nearest,
+ /// <summary>
+ /// For each output pixel, read a quad of four input pixels and write a weighted average of them.
+ /// </summary>
Linear,
+ /// <summary>
+ /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8 etc width and height and approximately the desired size, <br>
+ /// then for each output pixel, read one pixel from the last level of box filtering.<br>
+ /// </summary>
BoxThenNearest,
+ /// <summary>
+ /// Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average.
+ /// </summary>
BoxThenLinear,
+ /// <summary>
+ /// No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions.
+ /// </summary>
NoFilter,
+ /// <summary>
+ /// For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image.
+ /// </summary>
DontCare
}
/// </summary>
public enum VisualTransformPolicyType
{
+ /// <summary>
+ /// Relative to the control (percentage [0.0f to 1.0f] of the control).
+ /// </summary>
Relative = 0,
+ /// <summary>
+ /// Absolute value in world units.
+ /// </summary>
Absolute = 1
}
/// </summary>
public enum VisualTransformPropertyType
{
+ /// <summary>
+ /// Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
+ /// </summary>
Offset,
+ /// <summary>
+ /// Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units).
+ /// </summary>
Size,
+ /// <summary>
+ /// The origin of the visual within its control area.
+ /// </summary>
Origin,
+ /// <summary>
+ /// The anchor-point of the visual
+ /// </summary>
AnchorPoint,
+ /// <summary>
+ /// Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// </summary>
OffsetPolicy,
+ /// <summary>
+ /// Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units).
+ /// </summary>
SizePolicy
}
/// </summary>
public struct Visual
{
+ /// <summary>
+ /// The index for the visual type.
+ /// </summary>
public enum Type
{
+ /// <summary>
+ /// Renders a solid color as an internal border to the control's quad.
+ /// </summary>
Border,
+ /// <summary>
+ /// Renders a solid color to the control's quad.
+ /// </summary>
Color,
+ /// <summary>
+ /// Renders a smooth transition of colors to the control's quad.
+ /// </summary>
Gradient,
+ /// <summary>
+ /// Renders an image into the control's quad.
+ /// </summary>
Image,
+ /// <summary>
+ /// Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file.
+ /// </summary>
Mesh,
+ /// <summary>
+ /// Renders a simple 3D shape, such as a cube or sphere.
+ /// </summary>
Primitive,
+ /// <summary>
+ /// Renders a simple wire-frame outlining a quad.
+ /// </summary>
Wireframe,
+ /// <summary>
+ /// Renders text.
+ /// </summary>
Text,
+ /// <summary>
+ /// Renders an n-patch image.
+ /// </summary>
NPatch,
+ /// <summary>
+ /// Renders an SVG image.
+ /// </summary>
SVG,
+ /// <summary>
+ /// Renders a animated image. (Animated GIF)
+ /// </summary>
AnimatedImage
}
public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM;
public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA;
public static readonly int MixColor = NDalic.VISUAL_PROPERTY_MIX_COLOR;
+ public static readonly int Opacity = NDalic.VISUAL_PROPERTY_MIX_COLOR + 1;
}
/// <summary>
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG));
if (_url != null) { _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage));
if (_url != null) { _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); }
+ if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
+ if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
+ if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
+ if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
}
}
string _str1 = _propertyIndex.Substring(0, 1);
string _str2 = _propertyIndex.Substring(1);
string _str = _str1.ToLower() + _str2;
-
- //dynamic _obj = (object)_destinationValue;
+
PropertyValue val = PropertyValue.CreateFromObject(_destinationValue);
PropertyMap _transition = new PropertyMap();
_transition.Add("target", new PropertyValue(_target));
_transition.Add("property", new PropertyValue(_str));
- _transition.Add("targetValue", new PropertyValue(val));
+ _transition.Add("targetValue", val);
_transition.Add("animator", new PropertyValue(_animator));
_outputVisualMap = _transition;