Vectorial Drawing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leo

    #1

    Vectorial Drawing

    Hi :

    I search some articles explaining how to make a little VectorialDesign
    application with simple shape like line circles etc ... in C#


    thx !!!

    ~leo~


  • Scherbina Vladimir

    #2
    Re: Vectorial Drawing


    "Leo" <lvallauri@grim ladiforum.com> wrote in message
    news:3f29353b$0 $1754$626a54ce@ news.free.fr...[color=blue]
    > Hi :
    >
    > I search some articles explaining how to make a little VectorialDesign
    > application with simple shape like line circles etc ... in C#
    >
    >
    > thx !!!
    >
    > ~leo~[/color]

    some examples from sdk:

    class PlainForm : Form

    {

    protected override void OnPaint(PaintEv entArgs e)

    {

    Pen myPen = new Pen(Color.Red, 3);

    Graphics myGraphics = e.Graphics;

    myGraphics.Draw Line(myPen, 20, 10, 200, 100);

    }

    }



    then just create object of PlainForm :

    PlainForm Frm = new PlainForm();

    Frm.Show();



    put the needed code into OnPaint

    for drawing arcs use something like

    myGraphics.Draw Arc(myPen, 100, 50, 140, 70, 30, 180);

    for rectangle

    myGraphics.Draw Rectangle(myPen , 20, 10, 100, 50);

    for polygons

    Point[] myPointArray =
    {new Point(0, 0), new Point(50, 30), new Point(30, 60)};
    myGraphics.Draw Polygon(myPen, myPointArray);

    for images something like

    Bitmap myBMP = new Bitmap("SpaceCa det.bmp");
    Bitmap myGIF = new Bitmap("Soda.gi f");
    Bitmap myJPEG = new Bitmap("Mango.j pg");
    Bitmap myPNG = new Bitmap("Flowers .png");
    Bitmap myTIFF = new Bitmap("MS.tif" );

    myGraphics.Draw Image(myBMP, 10, 10);
    myGraphics.Draw Image(myGIF, 220, 10);
    myGraphics.Draw Image(myJPEG, 280, 10);
    myGraphics.Draw Image(myPNG, 150, 200);
    myGraphics.Draw Image(myTIFF, 300, 200);



    Comment

    • Scherbina Vladimir

      #3
      Re: Vectorial Drawing


      "Leo" <lvallauri@grim ladiforum.com> wrote in message
      news:3f29353b$0 $1754$626a54ce@ news.free.fr...[color=blue]
      > Hi :
      >
      > I search some articles explaining how to make a little VectorialDesign
      > application with simple shape like line circles etc ... in C#
      >
      >
      > thx !!!
      >
      > ~leo~[/color]

      some examples from sdk:

      class PlainForm : Form

      {

      protected override void OnPaint(PaintEv entArgs e)

      {

      Pen myPen = new Pen(Color.Red, 3);

      Graphics myGraphics = e.Graphics;

      myGraphics.Draw Line(myPen, 20, 10, 200, 100);

      }

      }



      then just create object of PlainForm :

      PlainForm Frm = new PlainForm();

      Frm.Show();



      put the needed code into OnPaint

      for drawing arcs use something like

      myGraphics.Draw Arc(myPen, 100, 50, 140, 70, 30, 180);

      for rectangle

      myGraphics.Draw Rectangle(myPen , 20, 10, 100, 50);

      for polygons

      Point[] myPointArray =
      {new Point(0, 0), new Point(50, 30), new Point(30, 60)};
      myGraphics.Draw Polygon(myPen, myPointArray);

      for images something like

      Bitmap myBMP = new Bitmap("SpaceCa det.bmp");
      Bitmap myGIF = new Bitmap("Soda.gi f");
      Bitmap myJPEG = new Bitmap("Mango.j pg");
      Bitmap myPNG = new Bitmap("Flowers .png");
      Bitmap myTIFF = new Bitmap("MS.tif" );

      myGraphics.Draw Image(myBMP, 10, 10);
      myGraphics.Draw Image(myGIF, 220, 10);
      myGraphics.Draw Image(myJPEG, 280, 10);
      myGraphics.Draw Image(myPNG, 150, 200);
      myGraphics.Draw Image(myTIFF, 300, 200);



      Comment

      • J

        #4
        Re: Vectorial Drawing

        On Mon, 4 Aug 2003 2:21:11 -0400, Leo wrote
        (in message <3f2dfb67$0$279 17$626a54ce@new s.free.fr>):
        [color=blue]
        > ok thx but it is just some gdi method not handeling the vectorial aspect !
        > no ?
        >
        >
        > "Scherbina Vladimir" <vladimir_ns@uk r.net> a écrit dans le message de
        > news:unIcdRVWDH A.1640@TK2MSFTN GP10.phx.gbl...[color=green]
        >>
        >> "Leo" <lvallauri@grim ladiforum.com> wrote in message
        >> news:3f29353b$0 $1754$626a54ce@ news.free.fr...[color=darkred]
        >>> Hi :
        >>>
        >>> I search some articles explaining how to make a little VectorialDesign
        >>> application with simple shape like line circles etc ... in C#
        >>>
        >>>
        >>> thx !!!
        >>>
        >>>> leo~[/color]
        >>
        >> some examples from sdk:
        >>
        >> class PlainForm : Form
        >>
        >> {
        >>
        >> protected override void OnPaint(PaintEv entArgs e)
        >>
        >> {
        >>
        >> Pen myPen = new Pen(Color.Red, 3);
        >>
        >> Graphics myGraphics = e.Graphics;
        >>
        >> myGraphics.Draw Line(myPen, 20, 10, 200, 100);
        >>
        >> }
        >>
        >> }
        >>
        >>
        >>
        >> then just create object of PlainForm :
        >>
        >> PlainForm Frm = new PlainForm();
        >>
        >> Frm.Show();
        >>
        >>
        >>
        >> put the needed code into OnPaint
        >>
        >> for drawing arcs use something like
        >>
        >> myGraphics.Draw Arc(myPen, 100, 50, 140, 70, 30, 180);
        >>
        >> for rectangle
        >>
        >> myGraphics.Draw Rectangle(myPen , 20, 10, 100, 50);
        >>
        >> for polygons
        >>
        >> Point[] myPointArray =
        >> {new Point(0, 0), new Point(50, 30), new Point(30, 60)};
        >> myGraphics.Draw Polygon(myPen, myPointArray);
        >>
        >> for images something like
        >>
        >> Bitmap myBMP = new Bitmap("SpaceCa det.bmp");
        >> Bitmap myGIF = new Bitmap("Soda.gi f");
        >> Bitmap myJPEG = new Bitmap("Mango.j pg");
        >> Bitmap myPNG = new Bitmap("Flowers .png");
        >> Bitmap myTIFF = new Bitmap("MS.tif" );
        >>
        >> myGraphics.Draw Image(myBMP, 10, 10);
        >> myGraphics.Draw Image(myGIF, 220, 10);
        >> myGraphics.Draw Image(myJPEG, 280, 10);
        >> myGraphics.Draw Image(myPNG, 150, 200);
        >> myGraphics.Draw Image(myTIFF, 300, 200);
        >>
        >>
        >>[/color]
        >
        >[/color]

        What you have to do is have virtual Canvas. Have objects that should be
        drawn on the virutal canvas. At this point, you have to map the virtual
        canvas to the Graphics that you can call gdi+ calls.

        j

        Comment

        Working...