Click here to Skip to main content
15,885,546 members
Articles / Multimedia / GDI+

Drawing Library

Rate me:
Please Sign up or sign in to vote.
4.78/5 (63 votes)
10 Dec 2007CPOL3 min read 292.7K   12.8K   211  
A library for creating shapes and developing tools.
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows.Forms;

namespace Globe.Graphics.Bidimensional.Common
{
    /// <summary>
    /// A shape property is changed.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="changing">Property.</param>
    public delegate void ShapeChangingHandler(IShape shape, object changing);

    /// <summary>
    /// The mouse is clicked down on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseDownOnShape(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The mouse is clicked up on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseUpOnShape(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The mouse is moved on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseMoveOnShape(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The mouse is clicked on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseClickOnShape(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The mouse is double clicked on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseDoubleClickOnShape(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The mouse is wheel on shape.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">MouseEventArgs.</param>
    public delegate void MouseWheel(IShape shape, IDocument document, MouseEventArgs e);

    /// <summary>
    /// The shape Paint function is called.
    /// </summary>
    /// <param name="shape">Shape.</param>
    /// <param name="document">Document.</param>
    /// <param name="e">PaintEventArgs.</param>
    public delegate void PaintOnShape(IShape shape, IDocument document, PaintEventArgs e);	
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Italy Italy
I am a biomedical engineer. I work in Genoa as software developer. I developed MFC ActiveX controls for industrial automation for 2 years and packages for Visual Studio 2005 for 1 year. Currently I'm working in .NET 3.5 in biomedical area.

Comments and Discussions