By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Graphics Path for C#/.net

P: n/a
I was wondering if there is some external way to create/generate a graphics
path for use in C#(.net)? i.e., something, say like using photoshop to
create the graphics paths then loading them up in C# and displaying them
with drawpath?

Thanks,
Jon
Sep 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jon,

Unfortunately, no, there isn't.

What you could do is create a plug in for photoshop that will export
this information in a way that you can utilize in C#. There is one already
for WPF, which exports XAML.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
>I was wondering if there is some external way to create/generate a graphics
path for use in C#(.net)? i.e., something, say like using photoshop to
create the graphics paths then loading them up in C# and displaying them
with drawpath?

Thanks,
Jon


Sep 26 '06 #2

P: n/a

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:er**************@TK2MSFTNGP04.phx.gbl...
Jon,

Unfortunately, no, there isn't.

What you could do is create a plug in for photoshop that will export
this information in a way that you can utilize in C#. There is one
already for WPF, which exports XAML.

Hope this helps.

Ok, What about this then. Do you know if there is a file format that is
structurally compatible with the GraphicsPath? What I mean is I was thinking
that I could just write a simple import/export routine that would store the
necessary information of the graphicspath in a file. I wouldn't want all
the complications that come with other formats(such as wmf, ps, etc...). I
could, for example, just store the C# code that creates the path but that
seems like it would be a little bulky and would require precompilation to
use(or use CLR).

I'll look into the photoshop plugin. I haven't worked with it before but it
would be an excellent way to draw the paths if its not a project in and of
itself to do.

Thanks,
Jon

Sep 26 '06 #3

P: n/a
Jon,

There is nothing that I know of that is structurally compatible with
GraphicsPath. GraphicsPath isn't even Serializable (xml serialization or
otherwise), so you can't really get path information from it without doing
it yourself.

I would just export XML from illustrator.

You mentioned photoshop in your original post, but I think you meant
illustrator. Photoshop isn't meant for things like paths and line
generation. That's what Illustrator is for.

Honestly, I would just take the plugin that generates XAML, and use
that. The plugin from Illustrator shouldn't be doing anything special in
terms of objects, I imagine that it uses lines, beizer curves, and simple
geometric paths/shapes. The resulting XAML should be easy to parse and
convert into a GraphicsPath.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jon Slaughter" <Jo***********@Hotmail.comwrote in message
news:12*************@corp.supernews.com...
>
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:er**************@TK2MSFTNGP04.phx.gbl...
>Jon,

Unfortunately, no, there isn't.

What you could do is create a plug in for photoshop that will export
this information in a way that you can utilize in C#. There is one
already for WPF, which exports XAML.

Hope this helps.


Ok, What about this then. Do you know if there is a file format that is
structurally compatible with the GraphicsPath? What I mean is I was
thinking that I could just write a simple import/export routine that would
store the necessary information of the graphicspath in a file. I wouldn't
want all the complications that come with other formats(such as wmf, ps,
etc...). I could, for example, just store the C# code that creates the
path but that seems like it would be a little bulky and would require
precompilation to use(or use CLR).

I'll look into the photoshop plugin. I haven't worked with it before but
it would be an excellent way to draw the paths if its not a project in and
of itself to do.

Thanks,
Jon

Sep 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.