473,748 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6218
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.co m

"Jon Slaughter" <Jo***********@ Hotmail.comwrot e in message
news:12******** *****@corp.supe rnews.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.c omwrote in
message news:er******** ******@TK2MSFTN GP04.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.co m

"Jon Slaughter" <Jo***********@ Hotmail.comwrot e in message
news:12******** *****@corp.supe rnews.com...
>
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:er******** ******@TK2MSFTN GP04.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
4452
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 serious problem, and I was hoping someone might have thoughts.
8
3324
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 froggraphic As Graphics = Graphics.FromImage(frogbitmap) froggraphic.RotateTransform(90) frogbitmap.Save(Server.MapPath("images/frog2.gif"), Imaging.ImageFormat.Gif)
5
1704
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 open a gif from one of the folders, I get the following message. Why would an ASPX file load, but a GIF file won't? I have tried messing with security on the files, and have even given 'Everyone' access to read and execute, but still no joy. ...
2
7223
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 identical lines of code for the fill, but want to know which is "more correct". LinearGradientBrush backColorBrush = new
1
15348
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 you have to load drivers for the graphic. -You must have the file EGAVGA.BGI to be in the same directory where your code is. -with this driver you will have 640/480 resolution with 16 colors 1 page or you can choose 320/280 16col with 2 video...
5
1255
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 path" but obviously I need so draw with different colors and stuff. Thanks, Jon
6
1164
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 size, and range from around 100k to about 2 megs. What I want to do is on my web page, keep the aspect ratio, but size them to be no more than 300 pixels wide. I've found some code to do this from a database, but can't find any that
2
3096
by: wstsoi | last post by:
hi I have to read images from spreadsheet, is it possible to do with php?
5
4065
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 make the text look nicer? Thanks Andy
10
7423
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); g.DrawPath(P1, Wirepath);
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8243
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.