diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 07:43:48 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 07:43:48 +0100 |
| commit | 158bc472eff0771479d48e5bd74a8141d62ab60a (patch) | |
| tree | 492f2d255de49b5c04ebba237ecb40b265bd6534 /src/GraphicObjects/Image.cs | |
| parent | a330b907a9c9252c480ea352606d961bdc7c3ecb (diff) | |
:book: , renames, move some controls to other project file
Diffstat (limited to 'src/GraphicObjects/Image.cs')
| -rw-r--r-- | src/GraphicObjects/Image.cs | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index 622fa714..75c59f4a 100644 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -33,6 +33,11 @@ using System.Diagnostics; namespace Crow { + /// <summary> + /// Base widget to display an image. Accepts bitmaps and SVGs. + /// </summary> + /// <remarks> + /// </remarks> public class Image : GraphicObject { Picture _pic; @@ -41,6 +46,9 @@ namespace Crow double opacity; #region Public properties + /// <summary> + /// If false, original size will be kept in any case. + /// </summary> [XmlAttributeAttribute][DefaultValue(true)] public virtual bool Scaled { get { return scaled; } @@ -55,6 +63,9 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// <summary> + /// If image is scaled, proportions will be preserved. + /// </summary> [XmlAttributeAttribute][DefaultValue(true)] public virtual bool KeepProportions { get { return keepProps; } @@ -69,6 +80,9 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// <summary> + /// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings. + /// </summary> [XmlAttributeAttribute] public string Path { get { return _pic == null ? "" : _pic.Path; } @@ -90,6 +104,10 @@ namespace Crow NotifyValueChanged ("Path", Path); } } + /// <summary> + /// Used only for svg images, repaint only node named referenced in SvgSub. + /// If null, all the svg is rendered + /// </summary> [XmlAttributeAttribute] public string SvgSub { get { return _svgSub; } @@ -100,6 +118,10 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// <summary> + /// Object holding the image data once loaded, may be used directely to pupulate this control without + /// specifying a path. + /// </summary> [XmlAttributeAttribute] public Picture Picture { get { return _pic; } @@ -111,6 +133,10 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// <summary> + /// Opacity parameter for the image + /// </summary> + // TODO:could be moved in GraphicObject [XmlAttributeAttribute()][DefaultValue(1.0)] public virtual double Opacity { get { return opacity; } @@ -125,7 +151,14 @@ namespace Crow #endregion #region CTOR - public Image () : base(){} + /// <summary> + /// Initializes a new instance of the <see cref="Crow.Image"/> class. + /// </summary> + protected Image () : base(){} + /// <summary> + /// Initializes a new instance of the <see cref="Crow.Image"/> class from code + /// </summary> + /// <param name="iface">interface to bound to</param> public Image (Interface iface) : base(iface) { } |