473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Graphics Path for C#/.net

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
3 6204
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
8
by: Nathan Sokalski | last post by:
I am trying to write code to rotate a graphic that I have. Here is the code I am currently using: Dim frogbitmap As New Bitmap(Drawing.Image.FromFile(Server.MapPath("images/frog.gif"))) Dim...
5
by: iainfogg | last post by:
I had an ASP.NET 2.0 site which works fine on my PC. I have just copied it to a server, and set it up to run in a virtual folder. The web pages work fine, but the graphics won't load - if I try to...
2
by: Mark Ingram | last post by:
Hi, I would like to know which is the faster method to call, FillRectangle or FillPath. I have a path which is essentially a square, except for rounded corners, so I can end up with 2 almost...
1
by: IvoShalev | last post by:
Hi there, I just want to give some sudgestions on how to draw some plain things only using the header file <graphics.hand of course the standart files <stdio.h<conio.h<stdlib.h>. First of All...
5
by: Jon Slaughter | last post by:
So theres no way to store state information in the graphics path such as pens and brushes? ;/ Any way to do this that is simple? (maybe a metafile?) I'm trying to describe a button as a "graphics...
6
by: Blasting Cap | last post by:
I have to change the front page for a sales system I work on, and want to use some thumbnails of wallpaper that is on a sister site. The wallpapers are jpegs, and are 640, 800, 1024 & 1280 in...
2
by: wstsoi | last post by:
hi I have to read images from spreadsheet, is it possible to do with php?
5
by: Andy | last post by:
Hi, I am using the following code to render a text string in a new bitmap file. The code works, but the text looks, well, crappy, even though I told it to use ClearType hints. Any idea how to...
10
by: eddie tan | last post by:
Hi, I have a picturebox with graphics drawn from different objects. In one object I used Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image);...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.