예제 #1
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the FontChangedEventArgs class.
    /// </summary>
    /// <param name="newFont">The newly created <see cref="Font"/></param>
    /// <param name="newColor">The <see cref="Color"/> for the newly created font.</param>
    /// <param name="newAlignment">The <see cref="VGAlignment"/> for the newly created font.</param>
    /// <param name="newGroup">vector graphics
    /// group to which the new font should be applied.</param>
    public FontChangedEventArgs(Font newFont, Color newColor, VGAlignment newAlignment, VGStyleGroup newGroup)
    {
      this.font = newFont;
      this.fontColor = newColor;
      this.fontAlignment = newAlignment;
      this.elementGroup = newGroup;
    }
예제 #2
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGRichText class.
        /// </summary>
        /// <param name="newShapeDrawAction"><see cref="ShapeDrawAction"/> for the bounds.</param>
        /// <param name="newRtf">string to display</param>
        /// <param name="newTransparency">A flag indicating a transparent background if true.</param>
        /// <param name="newPen">Pen to use</param>
        /// <param name="newBrush">Brush for drawing</param>
        /// <param name="newFont">Font for drawing name</param>
        /// <param name="newFontColor">Font color for drawing name.</param>
        /// <param name="position">TopLeft text position</param>
        /// <param name="size">Size of the clipping rectangle.</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        public VGRichText(
            ShapeDrawAction newShapeDrawAction,
            string newRtf,
            bool newTransparency,
            Pen newPen,
            Brush newBrush,
            Font newFont,
            Color newFontColor,
            PointF position,
            SizeF size,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newFont,
                newFontColor,
                new RectangleF(position, size),
                newStyleGroup,
                newName,
                newElementGroup,
                null)
        {
            this.RebuildUnderlyingRichTextBox();
            this.richTextBox.Rtf = newRtf;
            this.textLength      = this.richTextBox.TextLength;
        }
예제 #3
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGBrowser class.
        /// </summary>
        /// <param name="newShapeDrawAction"><see cref="ShapeDrawAction"/> for the bounds.</param>
        /// <param name="newBrowserURL"><see cref="Uri"/> for the browser start location</param>
        /// <param name="newBrowseDepth">The number of links the user is allowed to follow,
        /// including backward links.</param>
        /// <param name="newPen">Pen to use</param>
        /// <param name="newBrush">Brush for drawing</param>
        /// <param name="newFont">Font for drawing name</param>
        /// <param name="newFontColor">Font color for drawing name.</param>
        /// <param name="position">TopLeft text position</param>
        /// <param name="size">Size of the clipping rectangle.</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        public VGBrowser(
            ShapeDrawAction newShapeDrawAction,
            string newBrowserURL,
            int newBrowseDepth,
            Pen newPen,
            Brush newBrush,
            Font newFont,
            Color newFontColor,
            PointF position,
            SizeF size,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newFont,
                newFontColor,
                new RectangleF(position, size),
                newStyleGroup,
                newName,
                newElementGroup,
                null)
        {
            this.InitializeFields();
            this.BrowserURL  = newBrowserURL;
            this.BrowseDepth = newBrowseDepth;
        }
예제 #4
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the FontChangedEventArgs class.
        /// </summary>
        /// <param name="newFont">The newly created <see cref="Font"/></param>
        /// <param name="newColor">The <see cref="Color"/> for the newly created font.</param>
        /// <param name="newAlignment">The <see cref="VGAlignment"/> for the newly created font.</param>
        /// <param name="newGroup">vector graphics
        /// group to which the new font should be applied.</param>
        public FontChangedEventArgs(Font newFont, Color newColor, VGAlignment newAlignment, VGStyleGroup newGroup)
        {
            this.font          = newFont;
            this.fontColor     = newColor;
            this.fontAlignment = newAlignment;
            this.elementGroup  = newGroup;
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the VGRegion class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRegion(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     Brush newBrush,
     Font newFont,
     Color newFontColor,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(
         newShapeDrawAction,
         newPen,
         newBrush,
         newFont,
         newFontColor,
         newBounds,
         newStyleGroup,
         newName,
         newElementGroup,
         null)
 {
     this.region = new Region();
     this.region.MakeEmpty();
     this.region.Union(newBounds);
 }
예제 #6
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGFlash class.
        /// </summary>
        /// <param name="newShapeDrawAction"><see cref="ShapeDrawAction"/> for the bounds.</param>
        /// <param name="newFilename">Filename of the flash movie without path</param>
        /// <param name="newPath">Path to the flash movie.</param>
        /// <param name="newPen">Pen to use</param>
        /// <param name="newBrush">Brush for drawing</param>
        /// <param name="newFont">Font for drawing name</param>
        /// <param name="newFontColor">Font color for drawing name.</param>
        /// <param name="position">TopLeft text position</param>
        /// <param name="size">Size of the clipping rectangle.</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        public VGFlash(
            ShapeDrawAction newShapeDrawAction,
            string newFilename,
            string newPath,
            Pen newPen,
            Brush newBrush,
            Font newFont,
            Color newFontColor,
            PointF position,
            SizeF size,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newFont,
                newFontColor,
                new RectangleF(position, size),
                newStyleGroup,
                newName,
                newElementGroup,
                null)
        {
            this.IntializeFields();
            this.Filepath = newPath;
            this.Filename = newFilename;
        }
예제 #7
0
    ///////////////////////////////////////////////////////////////////////////////
    // Defining Constants                                                        //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTANTS

    #endregion //CONSTANTS

    ///////////////////////////////////////////////////////////////////////////////
    // Defining Variables, Enumerations, Events                                  //
    ///////////////////////////////////////////////////////////////////////////////
    #region FIELDS
    #endregion //FIELDS

    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the VGScrollImage class.
    /// When newShapeDrawAction is set to None, only the image will
    /// be drawn, with Edge an additional border is drawn,
    /// with fill an additional (hopefully transparent) fill is drawn over the image.
    /// </summary>
    /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both, None</param>
    /// <param name="newPen">Pen for additional borderline.</param>
    /// <param name="newBrush">Brush for additional fills.</param>
    /// <param name="newFont">Font for drawing name</param>
    /// <param name="newFontColor">Font color for drawing name.</param>
    /// <param name="newImageFile">filename without path</param>
    /// <param name="newPath">path to image file</param>
    /// <param name="newLayout"><see cref="ImageLayout"/> of the image</param>
    /// <param name="newAlpha">The transparency alpha for this image.0=transparent,1=opaque</param>
    /// <param name="newCanvas"><see cref="Size"/> of the owning original canvas</param>
    /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
    /// <param name="newName">Name of Element</param>
    /// <param name="newElementGroup">Element group description</param>
    public VGScrollImage(
      ShapeDrawAction newShapeDrawAction,
      Pen newPen,
      Brush newBrush,
      Font newFont,
      Color newFontColor,
      string newImageFile,
      string newPath,
      ImageLayout newLayout,
      float newAlpha,
      Size newCanvas,
      VGStyleGroup newStyleGroup,
      string newName,
      string newElementGroup)
      : base(
      newShapeDrawAction,
      newPen,
      newBrush,
      newFont,
      newFontColor,
      newImageFile,
      newPath,
      newLayout,
      newAlpha,
      newCanvas,
      newStyleGroup,
      newName,
      newElementGroup,
      false)
    {
    }
예제 #8
0
        ///////////////////////////////////////////////////////////////////////////////
        // Defining Constants                                                        //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTANTS

        #endregion //CONSTANTS

        ///////////////////////////////////////////////////////////////////////////////
        // Defining Variables, Enumerations, Events                                  //
        ///////////////////////////////////////////////////////////////////////////////
        #region FIELDS
        #endregion //FIELDS

        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGScrollImage class.
        /// When newShapeDrawAction is set to None, only the image will
        /// be drawn, with Edge an additional border is drawn,
        /// with fill an additional (hopefully transparent) fill is drawn over the image.
        /// </summary>
        /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both, None</param>
        /// <param name="newPen">Pen for additional borderline.</param>
        /// <param name="newBrush">Brush for additional fills.</param>
        /// <param name="newFont">Font for drawing name</param>
        /// <param name="newFontColor">Font color for drawing name.</param>
        /// <param name="newImageFile">filename without path</param>
        /// <param name="newPath">path to image file</param>
        /// <param name="newLayout"><see cref="ImageLayout"/> of the image</param>
        /// <param name="newAlpha">The transparency alpha for this image.0=transparent,1=opaque</param>
        /// <param name="newCanvas"><see cref="Size"/> of the owning original canvas</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        public VGScrollImage(
            ShapeDrawAction newShapeDrawAction,
            Pen newPen,
            Brush newBrush,
            Font newFont,
            Color newFontColor,
            string newImageFile,
            string newPath,
            ImageLayout newLayout,
            float newAlpha,
            Size newCanvas,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newFont,
                newFontColor,
                newImageFile,
                newPath,
                newLayout,
                newAlpha,
                newCanvas,
                newStyleGroup,
                newName,
                newElementGroup,
                false)
        {
        }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
     ShapeDrawAction newShapeDrawAction,
     Brush newBrush,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newBrush, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
     this.Path = new GraphicsPath();
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #12
0
파일: VGSharp.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGSharp class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGSharp(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #13
0
파일: VGPolyline.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
   this.Path = new GraphicsPath();
 }
예제 #14
0
 /// <summary>
 /// Initializes a new instance of the VGRectangle class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRectangle(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
     this.Bounds = Rectangle.Empty;
 }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the VGRectangle class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRectangle(
     ShapeDrawAction newShapeDrawAction,
     Brush newBrush,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newBrush, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the VGRegion class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRegion(
     ShapeDrawAction newShapeDrawAction,
     Brush newBrush,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newBrush, newStyleGroup, newName, newElementGroup)
 {
     this.region = new Region();
     this.region.MakeEmpty();
 }
예제 #17
0
 /// <summary>
 /// Initializes a new instance of the VGCursor class.
 /// </summary>
 /// <param name="newPen">A <see cref="Pen"/> for the edges.</param>
 /// <param name="newBrush">A <see cref="Brush"/> for the fills.<remarks>Currently used only for Mouse button fills.</remarks></param>
 /// <param name="newCursorType">A <see cref="DrawingCursors"/> to define the type of the cursor.</param>
 /// <param name="newSize">A <see cref="float"/> with the cursors size</param>
 /// <param name="newStyleGroup">A <see cref="VGStyleGroup"/> with the elements category</param>
 public VGCursor(
     Pen newPen,
     Brush newBrush,
     DrawingCursors newCursorType,
     float newSize,
     VGStyleGroup newStyleGroup)
     :
     base(ShapeDrawAction.Edge, newPen, newBrush, newStyleGroup, string.Empty, string.Empty)
 {
     this.Bounds     = new RectangleF(0, 0, newSize, newSize);
     this.cursorType = newCursorType;
 }
예제 #18
0
 /// <summary>
 /// Initializes a new instance of the VGSharp class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGSharp(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     Font newFont,
     Color newFontColor,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newFont, newFontColor, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #19
0
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
     ShapeDrawAction newShapeDrawAction,
     Brush newBrush,
     Font newFont,
     Color newFontColor,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newBrush, newFont, newFontColor, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #20
0
파일: VGLine.cs 프로젝트: zhjh-stack/ogama
 /// <summary>
 /// Initializes a new instance of the VGLine class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGLine(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
     this.Bounds      = Rectangle.Empty;
     this.firstPoint  = PointF.Empty;
     this.secondPoint = PointF.Empty;
 }
예제 #21
0
 /// <summary>
 /// Initializes a new instance of the VGRegion class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRegion(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     RectangleF newBounds,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newBounds, newStyleGroup, newName, newElementGroup)
 {
     this.region = new Region();
     this.region.MakeEmpty();
     this.region.Union(newBounds);
 }
예제 #22
0
파일: VGRegion.cs 프로젝트: DeSciL/Ogama
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the VGRegion class.
    /// </summary>
    /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
    /// <param name="newPen">Pen for edges</param>
    /// <param name="newBrush">Brush for fills</param>
    /// <param name="newBounds">bounding rectangle</param>
    /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
    /// <param name="newName">Name of Element</param>
    /// <param name="newElementGroup">Element group description</param>
    public VGRegion(
      ShapeDrawAction newShapeDrawAction,
      Pen newPen,
      Brush newBrush,
      RectangleF newBounds,
      VGStyleGroup newStyleGroup,
      string newName,
      string newElementGroup)
      : base(newShapeDrawAction, newPen, newBrush, newBounds, newStyleGroup, newName, newElementGroup)
    {
      this.region = new Region();
      this.region.MakeEmpty();
      this.region.Union(newBounds);
    }
예제 #23
0
        /// <summary>
        /// Searches the collection list for all members with
        /// the given group and returns this items in a new
        /// <see cref="VGElementCollection"/>
        /// </summary>
        /// <param name="searchGroup">The <see cref="VGStyleGroup"/>
        /// that the elements should match.</param>
        /// <returns>A <see cref="VGElementCollection"/> with the
        /// members of the list that are in the given search group.</returns>
        public VGElementCollection FindAllGroupMembers(VGStyleGroup searchGroup)
        {
            VGElementCollection subList = new VGElementCollection();

            foreach (VGElement element in this.List)
            {
                if ((element.StyleGroup & searchGroup) == searchGroup)
                {
                    subList.Add(element);
                }
            }

            return(subList);
        }
예제 #24
0
파일: VGLine.cs 프로젝트: zhjh-stack/ogama
 /// <summary>
 /// Initializes a new instance of the VGLine class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="pt1">first point</param>
 /// <param name="pt2">second point</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGLine(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     PointF pt1,
     PointF pt2,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
     this.firstPoint   = pt1;
     this.secondPoint  = pt2;
     this.Bounds       = this.GetBounds();
     this.pointsAreSet = true;
 }
예제 #25
0
 /// <summary>
 /// Initializes a new instance of the VGArrow class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGArrow(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     Font newFont,
     Color newFontColor,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newFont, newFontColor, newStyleGroup, newName, newElementGroup)
 {
     this.InitializeDefaults();
     this.Bounds      = Rectangle.Empty;
     this.firstPoint  = PointF.Empty;
     this.secondPoint = PointF.Empty;
 }
예제 #26
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGImage class.
        /// When newShapeDrawAction is set to None, only the image will
        /// be drawn, with Edge an additional border is drawn,
        /// with fill an additional (hopefully transparent) fill is drawn over the image.
        /// </summary>
        /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both, None</param>
        /// <param name="newPen">Pen for additional borderline.</param>
        /// <param name="newBrush">Brush for additional fills.</param>
        /// <param name="newFont">Font for drawing name</param>
        /// <param name="newFontColor">Font color for drawing name.</param>
        /// <param name="newImageFile">filename without path</param>
        /// <param name="newPath">path to image file</param>
        /// <param name="newLayout"><see cref="ImageLayout"/> of the image</param>
        /// <param name="newAlpha">The transparency alpha for this image.0=transparent,1=opaque</param>
        /// <param name="newCanvas"><see cref="Size"/> of the owning original canvas</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        /// <param name="withoutImageInMemoryCreation">Omits internal image creation during
        /// construction.</param>
        public VGImage(
            ShapeDrawAction newShapeDrawAction,
            Pen newPen,
            Brush newBrush,
            Font newFont,
            Color newFontColor,
            string newImageFile,
            string newPath,
            ImageLayout newLayout,
            float newAlpha,
            Size newCanvas,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup,
            bool withoutImageInMemoryCreation)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newFont,
                newFontColor,
                RectangleF.Empty,
                newStyleGroup,
                newName,
                newElementGroup,
                null)
        {
            this.filename = newImageFile;
            this.Filepath = newPath;
            this.canvas   = newCanvas;
            this.alpha    = newAlpha;

            if (!withoutImageInMemoryCreation)
            {
                if (!this.CreateInternalImage())
                {
                    return;
                }

                var unit = new GraphicsUnit();
                this.Bounds = this.Image.GetBounds(ref unit);
            }

            this.layout = newLayout;
            this.InitTransparencyMatrix();
        }
예제 #27
0
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="pts">Point list that constitutes polyline</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     PointF[] pts,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
     this.Path = new GraphicsPath();
     if (pts.Length >= 2)
     {
         this.Path.AddLines(pts);
     }
     else if (pts.Length == 1)
     {
         this.FirstPt = pts[0];
     }
 }
예제 #28
0
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
     ShapeDrawAction newShapeDrawAction,
     Pen newPen,
     Brush newBrush,
     Font newFont,
     Color newFontColor,
     VGStyleGroup newStyleGroup,
     string newName,
     string newElementGroup)
     : base(
         newShapeDrawAction,
         newPen,
         newBrush,
         newFont,
         newFontColor,
         RectangleF.Empty,
         newStyleGroup,
         newName,
         newElementGroup,
         null)
 {
     this.Path = new GraphicsPath();
 }
예제 #29
0
파일: VGText.cs 프로젝트: zhjh-stack/ogama
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the VGText class.
        /// </summary>
        /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
        /// <param name="newText">string to display</param>
        /// <param name="newFont">Font to use for the text</param>
        /// <param name="newFontColor">Color for the text</param>
        /// <param name="newAlignment">The <see cref="HorizontalAlignment"/> for the text.</param>
        /// <param name="newLineSpacing">The <see cref="float"/> with the new line spacing for the text.</param>
        /// <param name="newPadding">The <see cref="float"/> with the new text padding.</param>
        /// <param name="newPen">Pen for bounds</param>
        /// <param name="newBrush">Brush for fills</param>
        /// <param name="newNameFont">Font for name</param>
        /// <param name="newNameFontColor">Color for name</param>
        /// <param name="newBounds">Bounds of element</param>
        /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
        /// <param name="newName">Name of Element</param>
        /// <param name="newElementGroup">Element group description</param>
        /// <param name="newSound">Audio contents of Element</param>
        public VGText(
            ShapeDrawAction newShapeDrawAction,
            string newText,
            Font newFont,
            Color newFontColor,
            HorizontalAlignment newAlignment,
            float newLineSpacing,
            float newPadding,
            Pen newPen,
            Brush newBrush,
            Font newNameFont,
            Color newNameFontColor,
            RectangleF newBounds,
            VGStyleGroup newStyleGroup,
            string newName,
            string newElementGroup,
            AudioFile newSound)
            : base(
                newShapeDrawAction,
                newPen,
                newBrush,
                newNameFont,
                newNameFontColor,
                newBounds,
                newStyleGroup,
                newName,
                newElementGroup,
                newSound)
        {
            this.textFontColor = newFontColor;
            this.textAlignment = newAlignment;
            this.text          = newText;
            this.textFont      = newFont;
            this.LineSpacing   = newLineSpacing != 0 ? newLineSpacing : 1.0f;
            this.Padding       = newPadding;
        }
예제 #30
0
파일: VGPolyline.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   Brush newBrush,
   Font newFont,
   Color newFontColor,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(
   newShapeDrawAction,
   newPen,
   newBrush,
   newFont,
   newFontColor,
   RectangleF.Empty,
   newStyleGroup,
   newName,
   newElementGroup,
   null)
 {
   this.Path = new GraphicsPath();
 }
예제 #31
0
파일: VGPolyline.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGPolyline class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="pts">Point list that constitutes polyline</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGPolyline(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   PointF[] pts,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
   this.Path = new GraphicsPath();
   if (pts.Length >= 2)
   {
     this.Path.AddLines(pts);
   }
   else if (pts.Length == 1)
   {
     this.FirstPt = pts[0];
   }
 }
예제 #32
0
파일: VGImage.cs 프로젝트: DeSciL/Ogama
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the VGImage class.
    /// When newShapeDrawAction is set to None, only the image will
    /// be drawn, with Edge an additional border is drawn,
    /// with fill an additional (hopefully transparent) fill is drawn over the image.
    /// </summary>
    /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both, None</param>
    /// <param name="newPen">Pen for additional borderline.</param>
    /// <param name="newBrush">Brush for additional fills.</param>
    /// <param name="newFont">Font for drawing name</param>
    /// <param name="newFontColor">Font color for drawing name.</param>
    /// <param name="newImageFile">filename without path</param>
    /// <param name="newPath">path to image file</param>
    /// <param name="newLayout"><see cref="ImageLayout"/> of the image</param>
    /// <param name="newAlpha">The transparency alpha for this image.0=transparent,1=opaque</param>
    /// <param name="newCanvas"><see cref="Size"/> of the owning original canvas</param>
    /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
    /// <param name="newName">Name of Element</param>
    /// <param name="newElementGroup">Element group description</param>
    /// <param name="withoutImageInMemoryCreation">Omits internal image creation during
    /// construction.</param>
    public VGImage(
      ShapeDrawAction newShapeDrawAction,
      Pen newPen,
      Brush newBrush,
      Font newFont,
      Color newFontColor,
      string newImageFile,
      string newPath,
      ImageLayout newLayout,
      float newAlpha,
      Size newCanvas,
      VGStyleGroup newStyleGroup,
      string newName,
      string newElementGroup,
      bool withoutImageInMemoryCreation)
      : base(
      newShapeDrawAction,
      newPen,
      newBrush,
      newFont,
      newFontColor,
      RectangleF.Empty,
      newStyleGroup,
      newName,
      newElementGroup,
      null)
    {
      this.filename = newImageFile;
      this.Filepath = newPath;
      this.canvas = newCanvas;
      this.alpha = newAlpha;

      if (!withoutImageInMemoryCreation)
      {
        if (!this.CreateInternalImage())
        {
          return;
        }

        var unit = new GraphicsUnit();
        this.Bounds = this.Image.GetBounds(ref unit);
      }

      this.layout = newLayout;
      this.InitTransparencyMatrix();
    }
예제 #33
0
파일: VGFlash.cs 프로젝트: DeSciL/Ogama
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the VGFlash class.
    /// </summary>
    /// <param name="newShapeDrawAction"><see cref="ShapeDrawAction"/> for the bounds.</param>
    /// <param name="newFilename">Filename of the flash movie without path</param>
    /// <param name="newPath">Path to the flash movie.</param>
    /// <param name="newPen">Pen to use</param>
    /// <param name="newBrush">Brush for drawing</param>
    /// <param name="newFont">Font for drawing name</param>
    /// <param name="newFontColor">Font color for drawing name.</param>
    /// <param name="position">TopLeft text position</param>
    /// <param name="size">Size of the clipping rectangle.</param>
    /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
    /// <param name="newName">Name of Element</param>
    /// <param name="newElementGroup">Element group description</param>
    public VGFlash(
      ShapeDrawAction newShapeDrawAction,
      string newFilename,
      string newPath,
      Pen newPen,
      Brush newBrush,
      Font newFont,
      Color newFontColor,
      PointF position,
      SizeF size,
      VGStyleGroup newStyleGroup,
      string newName,
      string newElementGroup)
      : base(
      newShapeDrawAction,
      newPen,
      newBrush,
      newFont,
      newFontColor,
      new RectangleF(position, size),
      newStyleGroup,
      newName,
      newElementGroup,
      null)
    {
      this.IntializeFields();
      this.Filepath = newPath;
      this.Filename = newFilename;
    }
예제 #34
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the BrushChangedEventArgs class.
    /// </summary>
    /// <param name="newBrush">The newly created <see cref="Brush"/>.</param>
    /// <param name="newGroup">vector graphics
    /// group to which the new brush should be applied.</param>
    public BrushChangedEventArgs(Brush newBrush, VGStyleGroup newGroup)
    {
      this.brush = newBrush;
      this.brushGroup = newGroup;
    }
예제 #35
0
파일: VGEllipse.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   Brush newBrush,
   Font newFont,
   Color newFontColor,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(
   newShapeDrawAction,
   newPen,
   newBrush,
   newFont,
   newFontColor,
   newBounds,
   newStyleGroup,
   newName,
   newElementGroup,
   null)
 {
 }
예제 #36
0
파일: VGEllipse.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newBounds">bounding rectangle</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
   ShapeDrawAction newShapeDrawAction,
   Brush newBrush,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newBrush, newBounds, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #37
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGElement class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBounds">Bounds of element</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGElement(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
 {
   this.InitStandards();
   this.styleGroup = newStyleGroup;
   this.name = newName;
   this.elementGroup = newElementGroup;
   this.shapeDrawAction = newShapeDrawAction;
   this.pen = newPen == null ? null : (Pen)newPen.Clone();
   this.Bounds = newBounds;
 }
예제 #38
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGElement class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for text and fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">Bounds of element</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGElement(
   ShapeDrawAction newShapeDrawAction,
   Brush newBrush,
   Font newFont,
   Color newFontColor,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
 {
   this.InitStandards();
   this.styleGroup = newStyleGroup;
   this.name = newName;
   this.elementGroup = newElementGroup;
   this.shapeDrawAction = newShapeDrawAction;
   this.Brush = newBrush == null ? null : (Brush)newBrush.Clone();
   this.Font = newFont == null ? null : (Font)newFont.Clone();
   this.FontColor = newFontColor;
   this.Bounds = newBounds;
 }
예제 #39
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGElement class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for text and fills</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGElement(
   ShapeDrawAction newShapeDrawAction,
   Brush newBrush,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
 {
   this.InitStandards();
   this.styleGroup = newStyleGroup;
   this.name = newName;
   this.elementGroup = newElementGroup;
   this.shapeDrawAction = newShapeDrawAction;
   this.Brush = newBrush == null ? null : (Brush)newBrush.Clone();
 }
예제 #40
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGElement class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGElement(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   Font newFont,
   Color newFontColor,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
 {
   this.InitStandards();
   this.styleGroup = newStyleGroup;
   this.name = newName;
   this.elementGroup = newElementGroup;
   this.Font = newFont == null ? null : (Font)newFont.Clone();
   this.FontColor = newFontColor;
   this.shapeDrawAction = newShapeDrawAction;
   this.pen = newPen == null ? null : (Pen)newPen.Clone();
 }
예제 #41
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGElement class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newBrush">Brush for text and fills</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newBounds">Bounds of element</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 /// <param name="newSound">The <see cref="AudioFile"/> to play with this element.</param>
 public VGElement(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   Brush newBrush,
   Font newFont,
   Color newFontColor,
   RectangleF newBounds,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup,
   AudioFile newSound)
 {
   this.InitStandards();
   this.pen = newPen == null ? null : (Pen)newPen.Clone();
   this.Brush = newBrush == null ? null : (Brush)newBrush.Clone();
   this.Bounds = newBounds;
   this.styleGroup = newStyleGroup;
   this.name = newName;
   this.elementGroup = newElementGroup;
   this.Font = newFont == null ? null : (Font)newFont.Clone();
   this.FontColor = newFontColor;
   this.shapeDrawAction = newShapeDrawAction;
   if (newSound != null)
   {
     this.Sound = (AudioFile)newSound.Clone();
   }
 }
예제 #42
0
파일: VGBrowser.cs 프로젝트: DeSciL/Ogama
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the VGBrowser class.
    /// </summary>
    /// <param name="newShapeDrawAction"><see cref="ShapeDrawAction"/> for the bounds.</param>
    /// <param name="newBrowserURL"><see cref="Uri"/> for the browser start location</param>
    /// <param name="newBrowseDepth">The number of links the user is allowed to follow,
    /// including backward links.</param>
    /// <param name="newPen">Pen to use</param>
    /// <param name="newBrush">Brush for drawing</param>
    /// <param name="newFont">Font for drawing name</param>
    /// <param name="newFontColor">Font color for drawing name.</param>
    /// <param name="position">TopLeft text position</param>
    /// <param name="size">Size of the clipping rectangle.</param>
    /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
    /// <param name="newName">Name of Element</param>
    /// <param name="newElementGroup">Element group description</param>
    public VGBrowser(
      ShapeDrawAction newShapeDrawAction,
      string newBrowserURL,
      int newBrowseDepth,
      Pen newPen,
      Brush newBrush,
      Font newFont,
      Color newFontColor,
      PointF position,
      SizeF size,
      VGStyleGroup newStyleGroup,
      string newName,
      string newElementGroup)
      : base(
      newShapeDrawAction,
      newPen,
      newBrush,
      newFont,
      newFontColor,
      new RectangleF(position, size),
      newStyleGroup,
      newName,
      newElementGroup,
      null)
    {
      this.InitializeFields();
      this.BrowserURL = newBrowserURL;
      this.BrowseDepth = newBrowseDepth;
    }
예제 #43
0
파일: VGEllipse.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGEllipse class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGEllipse(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
 }
예제 #44
0
파일: VGCursor.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGCursor class.
 /// </summary>
 /// <param name="newPen">A <see cref="Pen"/> for the edges.</param>
 /// <param name="newBrush">A <see cref="Brush"/> for the fills.<remarks>Currently used only for Mouse button fills.</remarks></param>
 /// <param name="newCursorType">A <see cref="DrawingCursors"/> to define the type of the cursor.</param>
 /// <param name="newSize">A <see cref="float"/> with the cursors size</param>
 /// <param name="newStyleGroup">A <see cref="VGStyleGroup"/> with the elements category</param>
 public VGCursor(
   Pen newPen,
   Brush newBrush,
   DrawingCursors newCursorType,
   float newSize,
   VGStyleGroup newStyleGroup)
   :
   base(ShapeDrawAction.Edge, newPen, newBrush, newStyleGroup, string.Empty, string.Empty)
 {
   this.Bounds = new RectangleF(0, 0, newSize, newSize);
   this.cursorType = newCursorType;
 }
예제 #45
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the PenChangedEventArgs class.
        /// </summary>
        /// <param name="newPen">This is the new created pen.</param>
        /// <param name="newGroup">vector graphics
        /// group to which the new pen should be applied.</param>
        public PenChangedEventArgs(Pen newPen, VGStyleGroup newGroup)
        {
            this.pen      = newPen;
            this.penGroup = newGroup;
        }
예제 #46
0
파일: VGRegion.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGRegion class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newBrush">Brush for fills</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGRegion(
   ShapeDrawAction newShapeDrawAction,
   Brush newBrush,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newBrush, newStyleGroup, newName, newElementGroup)
 {
   this.region = new Region();
   this.region.MakeEmpty();
 }
예제 #47
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the BrushChangedEventArgs class.
        /// </summary>
        /// <param name="newBrush">The newly created <see cref="Brush"/>.</param>
        /// <param name="newGroup">vector graphics
        /// group to which the new brush should be applied.</param>
        public BrushChangedEventArgs(Brush newBrush, VGStyleGroup newGroup)
        {
            this.brush      = newBrush;
            this.brushGroup = newGroup;
        }
예제 #48
0
파일: VGArrow.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGArrow class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGArrow(
   ShapeDrawAction newShapeDrawAction, 
   Pen newPen, 
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
   this.InitializeDefaults();
   this.Bounds = Rectangle.Empty;
   this.firstPoint = PointF.Empty;
   this.secondPoint = PointF.Empty;
 }
예제 #49
0
파일: VGSharp.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGSharp class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGSharp(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
   this.Bounds = Rectangle.Empty;
 }
예제 #50
0
        /// <summary>
        /// This method updates the style of the elements from the given <see cref="VGStyleGroup"/>
        ///   with the new value and updates the pictures styles.
        /// </summary>
        /// <param name="vGStyleGroup">
        /// The <see cref="VGStyleGroup"/> whichs style should
        ///   be changed
        /// </param>
        /// <param name="e">
        /// The <see cref="ShapePropertiesChangedEventArgs"/> with the new style.
        /// </param>
        public void ShapePropertiesChanged(VGStyleGroup vGStyleGroup, ShapePropertiesChangedEventArgs e)
        {
            var sublist = this.Elements.FindAllGroupMembers(vGStyleGroup);

            var showNumbers = false;
            var drawAction  = e.ShapeDrawAction;

            if (vGStyleGroup == VGStyleGroup.AOI_STATISTICS_ARROW)
            {
                if ((e.ShapeDrawAction & ShapeDrawAction.Name) == ShapeDrawAction.Name)
                {
                    drawAction &= ~ShapeDrawAction.Name;
                    showNumbers = true;
                }
            }

            foreach (VGElement element in sublist)
            {
                element.Pen             = e.Pen;
                element.Brush           = e.Brush;
                element.TextAlignment   = e.TextAlignment;
                element.ShapeDrawAction = drawAction;
                if (element is VGArrow)
                {
                    ((VGArrow)element).WeightFont      = e.NewFont;
                    ((VGArrow)element).WeightFontColor = e.NewFontColor;
                    if (showNumbers)
                    {
                        ((VGArrow)element).HideWeights = false;
                    }
                    else
                    {
                        ((VGArrow)element).HideWeights = true;
                    }
                }
                else
                {
                    element.Font      = e.NewFont;
                    element.FontColor = e.NewFontColor;
                }
            }

            this.DrawForeground(true);

            switch (vGStyleGroup)
            {
            case VGStyleGroup.AOI_STATISTICS_ARROW:
                this.ArrowPen           = e.Pen;
                this.ArrowBrush         = e.Brush;
                this.ArrowFont          = e.NewFont;
                this.ArrowFontColor     = e.NewFontColor;
                this.ArrowTextAlignment = e.TextAlignment;
                this.ArrowDrawAction    = e.ShapeDrawAction;
                break;

            case VGStyleGroup.AOI_STATISTICS_BUBBLE:
                this.BubblePen           = e.Pen;
                this.BubbleBrush         = e.Brush;
                this.BubbleFont          = e.NewFont;
                this.BubbleFontColor     = e.NewFontColor;
                this.BubbleTextAlignment = e.TextAlignment;
                this.BubbleDrawAction    = e.ShapeDrawAction;
                break;
            }
        }
예제 #51
0
 ///////////////////////////////////////////////////////////////////////////////
 // Construction and Initializing methods                                     //
 ///////////////////////////////////////////////////////////////////////////////
 #region CONSTRUCTION
 
 /// <summary>
 /// Initializes a new instance of the PenChangedEventArgs class.
 /// </summary>
 /// <param name="newPen">This is the new created pen.</param>
 /// <param name="newGroup">vector graphics
 /// group to which the new pen should be applied.</param>
 public PenChangedEventArgs(Pen newPen, VGStyleGroup newGroup)
 {
   this.pen = newPen;
   this.penGroup = newGroup;
 }
예제 #52
0
    /// <summary>
    /// Searches the collection list for all members with
    /// the given group and returns this items in a new
    /// <see cref="VGElementCollection"/>
    /// </summary>
    /// <param name="searchGroup">The <see cref="VGStyleGroup"/>
    /// that the elements should match.</param>
    /// <returns>A <see cref="VGElementCollection"/> with the 
    /// members of the list that are in the given search group.</returns>
    public VGElementCollection FindAllGroupMembers(VGStyleGroup searchGroup)
    {
      VGElementCollection subList = new VGElementCollection();
      foreach (VGElement element in this.List)
      {
        if ((element.StyleGroup & searchGroup) == searchGroup)
        {
          subList.Add(element);
        }
      }

      return subList;
    }
예제 #53
0
파일: VGLine.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGLine class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="newFont">Font for text</param>
 /// <param name="newFontColor">Color for text</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGLine(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   Font newFont,
   Color newFontColor,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newFont, newFontColor, newStyleGroup, newName, newElementGroup)
 {
   this.Bounds = Rectangle.Empty;
   this.firstPoint = PointF.Empty;
   this.secondPoint = PointF.Empty;
 }
예제 #54
0
파일: VGLine.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGLine class.
 /// </summary>
 /// <param name="newShapeDrawAction">Drawing action: Edge, Fill, Both</param>
 /// <param name="newPen">Pen for edges</param>
 /// <param name="pt1">first point</param>
 /// <param name="pt2">second point</param>
 /// <param name="newStyleGroup">Group Enumeration, <see cref="VGStyleGroup"/></param>
 /// <param name="newName">Name of Element</param>
 /// <param name="newElementGroup">Element group description</param>
 public VGLine(
   ShapeDrawAction newShapeDrawAction,
   Pen newPen,
   PointF pt1,
   PointF pt2,
   VGStyleGroup newStyleGroup,
   string newName,
   string newElementGroup)
   : base(newShapeDrawAction, newPen, newStyleGroup, newName, newElementGroup)
 {
   this.firstPoint = pt1;
   this.secondPoint = pt2;
   this.Bounds = this.GetBounds();
   this.pointsAreSet = true;
 }
예제 #55
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Virtual. An override should reset this shape to default values.
 /// This base class implementation resets the base class fields.
 /// </summary>
 public virtual void Reset()
 {
   this.TextAlignment = VGAlignment.Center;
   this.Brush = DefaultBrush;
   this.Font = DefaultFont;
   this.FontColor = DefaultFontColor;
   this.Visible = true;
   this.GrabHandles.Clear();
   this.styleGroup = VGStyleGroup.None;
   this.isInEditMode = false;
   this.Modified = false;
   this.location = new PointF(0, 0);
   this.ModifierKeys = Keys.None;
   this.pen = DefaultPen;
   this.shapeDrawAction = ShapeDrawAction.Edge;
   this.size = new SizeF(100, 100);
   this.name = string.Empty;
 }
예제 #56
0
파일: AOIPicture.cs 프로젝트: DeSciL/Ogama
    /// <summary>
    /// This method updates the style of the elements from the given <see cref="VGStyleGroup"/>
    ///   with the new value and updates the pictures styles.
    /// </summary>
    /// <param name="vGStyleGroup">
    /// The <see cref="VGStyleGroup"/> whichs style should
    ///   be changed
    /// </param>
    /// <param name="e">
    /// The <see cref="ShapePropertiesChangedEventArgs"/> with the new style.
    /// </param>
    public void ShapePropertiesChanged(VGStyleGroup vGStyleGroup, ShapePropertiesChangedEventArgs e)
    {
      var sublist = this.Elements.FindAllGroupMembers(vGStyleGroup);

      var showNumbers = false;
      var drawAction = e.ShapeDrawAction;

      if (vGStyleGroup == VGStyleGroup.AOI_STATISTICS_ARROW)
      {
        if ((e.ShapeDrawAction & ShapeDrawAction.Name) == ShapeDrawAction.Name)
        {
          drawAction &= ~ShapeDrawAction.Name;
          showNumbers = true;
        }
      }

      foreach (VGElement element in sublist)
      {
        element.Pen = e.Pen;
        element.Brush = e.Brush;
        element.TextAlignment = e.TextAlignment;
        element.ShapeDrawAction = drawAction;
        if (element is VGArrow)
        {
          ((VGArrow)element).WeightFont = e.NewFont;
          ((VGArrow)element).WeightFontColor = e.NewFontColor;
          if (showNumbers)
          {
            ((VGArrow)element).HideWeights = false;
          }
          else
          {
            ((VGArrow)element).HideWeights = true;
          }
        }
        else
        {
          element.Font = e.NewFont;
          element.FontColor = e.NewFontColor;
        }
      }

      this.DrawForeground(true);

      switch (vGStyleGroup)
      {
        case VGStyleGroup.AOI_STATISTICS_ARROW:
          this.ArrowPen = e.Pen;
          this.ArrowBrush = e.Brush;
          this.ArrowFont = e.NewFont;
          this.ArrowFontColor = e.NewFontColor;
          this.ArrowTextAlignment = e.TextAlignment;
          this.ArrowDrawAction = e.ShapeDrawAction;
          break;
        case VGStyleGroup.AOI_STATISTICS_BUBBLE:
          this.BubblePen = e.Pen;
          this.BubbleBrush = e.Brush;
          this.BubbleFont = e.NewFont;
          this.BubbleFontColor = e.NewFontColor;
          this.BubbleTextAlignment = e.TextAlignment;
          this.BubbleDrawAction = e.ShapeDrawAction;
          break;
      }
    }
예제 #57
0
파일: VGElement.cs 프로젝트: DeSciL/Ogama
 /// <summary>
 /// Set standard values for members variables.
 /// </summary>
 private void InitStandards()
 {
   this.TextAlignment = VGAlignment.Center;
   this.Visible = true;
   this.Brush = (Brush)VGElement.DefaultBrush.Clone();
   this.pen = (Pen)VGElement.DefaultPen.Clone();
   this.Font = (Font)VGElement.DefaultFont.Clone();
   this.FontColor = VGElement.DefaultFontColor;
   this.styleGroup = VGStyleGroup.None;
   this.name = string.Empty;
   this.GrabHandles = new List<GrabHandle>();
   this.location = PointF.Empty;
   this.size = SizeF.Empty;
   this.Sound = new AudioFile();
 }