c# and vector image files

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

    c# and vector image files

    Ive seen on the web third party componets such as custom buttons and
    guages and dashboard graphics in controls that graphicaly look realy
    good.

    I was wonderinghow they do thos great looking controls.

    I know its possible to produce custom controls with GDI+ to draw the
    gpahics, but it would seem almost impossible to draw some of the realy
    complex controls ive seen.

    I was wondering if c# supports any vector file formats. Can you create
    a custom control using a vector file embeded into the control for
    different states of the controls. Or is there a way to take a vector
    file and auto generate the GDI code to reproduce it in windows form.

    Im wanting to use vector files becasue it should mean the control can
    be resized at will without pixelisation.

    Does anyone have any thoughts ?


    thanks

    Peted
  • Marc Gravell

    #2
    Re: c# and vector image files

    Perhaps look at WPF (part of .NET 3.0) instead - this allows most of
    what you are talking about, while still dealing in managed code.

    Marc

    Comment

    • Marc Gravell

      #3
      Re: c# and vector image files

      And possibly combine the two ideas: http://www.wpf-graphics.com/ViewerSvg.aspx
      (I haven't used it - not a recommendation, but looks interesting)

      Comment

      • Ignacio Machin \( .NET/ C# MVP \)

        #4
        Re: c# and vector image files

        Hi,


        --
        Ignacio Machin
        The #1 Warehouse Management System & Direct Store Delivery Software (DSD) for QuickBooks & ERP Systems – LaceUp Solutions

        Mobile & warehouse Solutions.
        <Petedwrote in message news:epkji3li2k 04q2a5vq93r8vl0 le76i7cp5@4ax.c om...
        Ive seen on the web third party componets such as custom buttons and
        guages and dashboard graphics in controls that graphicaly look realy
        good.
        >
        I was wonderinghow they do thos great looking controls.
        A lot of work and years of expertise. :-)

        Im wanting to use vector files becasue it should mean the control can
        be resized at will without pixelisation.
        >
        Does anyone have any thoughts ?
        you can master using GDI+, take a look at Bob Powell's website/book. It
        takes a lot of work though. The easiest solution is to simply stick with a
        good third party lib and use it :)


        Comment

        • randy.buchholz

          #5
          Re: c# and vector image files

          Silverlight handles vectors.

          <Petedwrote in message news:epkji3li2k 04q2a5vq93r8vl0 le76i7cp5@4ax.c om...
          Ive seen on the web third party componets such as custom buttons and
          guages and dashboard graphics in controls that graphicaly look realy
          good.
          >
          I was wonderinghow they do thos great looking controls.
          >
          I know its possible to produce custom controls with GDI+ to draw the
          gpahics, but it would seem almost impossible to draw some of the realy
          complex controls ive seen.
          >
          I was wondering if c# supports any vector file formats. Can you create
          a custom control using a vector file embeded into the control for
          different states of the controls. Or is there a way to take a vector
          file and auto generate the GDI code to reproduce it in windows form.
          >
          Im wanting to use vector files becasue it should mean the control can
          be resized at will without pixelisation.
          >
          Does anyone have any thoughts ?
          >
          >
          thanks
          >
          Peted

          Comment

          • Peter Duniho

            #6
            Re: c# and vector image files

            On 2007-11-01 06:31:57 -0700, Peted said:
            [...]
            I was wondering if c# supports any vector file formats. Can you create
            a custom control using a vector file embeded into the control for
            different states of the controls. Or is there a way to take a vector
            file and auto generate the GDI code to reproduce it in windows form.
            C# supports the original Windows vector file format: Windows Metafile.
            It has a Metafile class, derived from Image.

            The newer technologies may be preferable if you can use them, but you
            should be able to use a Metafile for the purpose you've described if
            you have to. Of course, you can't just replace the rendition of any
            random control with a metafile representation; it has to be a control
            that already allows that, via setting of an Image property. That's
            where the newer technologies may be more useful.

            But it can be done and if you're writing a custom control from scratch,
            it should be very easy (since you're writing the code to do all the
            rendering anyway).

            Pete

            Comment

            Working...