drawing

Drawing Library for Ruby

I am trying to code a flowchart generator for a language using Ruby. I wanted to know if there were any libraries that I could use to draw various shapes for the various flowchart elements and write out text to those shapes. I would really prefer not having to write code for drawing basic shapes, if I can help it. If someone could po...

Fast, Pixel Precision 2D Drawing API for Graphics App?

I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is required.) I would like ...

CGPathAddArc vs CGPathAddArcToPoint

Apple's CoreGraphics library defines two functions for describing an arc. CGPathAddArc adds an arc based on a center point, radius, and pair of angles. CGPathAddArcToPoint adds an arc based on a radius and a pair of tangent lines. The details are explained in the CGPath API reference. Why two functions? Simple convenience? Is one ...

getting a DrawingContext for a wpf WriteableBitmap

Is there a way to get a DrawingContext (or something similar) for a WriteableBitmap? I.e. something to allow you to call simple DrawLine/DrawRectangle/etc kinds of methods, rather than manipulate the raw pixels directly. ...

How to draw in the nonclient area?

I'd like to be able to do some drawing to the right of the menu bar, in the nonclient area of a window. Is this possible, using C++ / MFC? ...

What is the ultimate program to make a drawing of a database model?

One of the first things I do when I'm on a new project is design a database model. To visualize the model I use a 7 year old version of Smartdraw. Maybe it's time for something new. What is the ultimate program to make a drawing of a database model. Smartdraw is for Windows only. Is there something that can be used on unix as well? ...

How do I set the thickness of a line in VB.NET

In VB.NET I'm drawing an ellipse using some code like this. aPen = New Pen(Color.Black) g.DrawEllipse(aPen, n.boxLeft, n.boxTop, n.getWidth(), n.getHeight) But I want to set the thickness of the line. How do I do it? Is it a property of the Pen or an argument to the DrawEllipse method? (NB : For some reason, the help is VisualStud...

Shape recognition algorithm(s)

Can anyone point me to a shape recognition algorithm, preferably in C#/Java but other languages are fine too. ...

Double buffer child controls in custom control (C#)

I want to double buffer a custom control which contains buttons. I have tried various ways to double buffer the control; SetStyle, BufferedGraphicsContext, and drawing to a bitmap. These all work fine for the custom drawing of the control, but none of them handle drawing the button to a back buffer. How do I achieve this? ...

Issues with using unsupported Win32 GDI Pens modes?

The MSDN documentation is (somewhat) clear about the following two facts about GDI Pens: A Cosmetic pen (create via CreatePen or ExtCreatePen w/ PS_COSMETIC) must be 1 unit wide (well, <= 1, but let's not go there). A Geometric (ExtCreatePen w/ PS_GEOMETRIC) pen must solid (PS_SOLID only, no PS_DASH, etc). They can, however, draw fatt...

Can I suspend drawing to perform multiple successive updates in Flex?

I've written a simple calendar control to allow for selecting single days, weeks, months and so on. The simplicity comes from the fact that I don't really do any drawing myself, opting instead to create a bunch of boxes and labels to act as date cells for the calendar. When a date or a date range is selected, I need to highlight that ...

How to create a picture with animated aspects programmatically

Background I have been asked by a client to create a picture of the world which has animated arrows/rays that come from one part of the world to another. The rays will be randomized, will represent a transaction, will fade out after they happen and will increase in frequency as time goes on. The rays will start in one country's bou...

2D overlap line chart

Hi Does any one know of an API that would allow me to draw something like this. It would need some interactivity to it zooming change second dimension axis angle I was looking at JFreeChart but I don't see any example of doing 2D overlap chart. Thanks ...

How do I draw lines using XNA?

I've read a bunch of tutorials involving XNA (and it's various versions) and I still am a little confused on drawing primitives. Everything seems to be really convoluted. Can someone show me, using code, the simplest XNA implementation of drawing one or two lines on to the screen? Perhaps with a brief explanation (including the boiler...

GDI+ 's Amazing decode speed, and terrible draw speed!

Thanks for answers,Actually I am not puzzled about draw 1024*768 pixels is slower than 100* 100 pixels... It is so simple a logic.. Which made me puzzled is that DrawImage's interpolation algorithm may be very slow, while there exists lots of better algorithm, and its decoder seems can decode from a jpg with a certain resolution, it is...

C#/GDI - Create 1bpp mask from image.

How do you create a 1 bit per pixel mask from an image using GDI in C#? The image I am trying to create the mask from is held in a System.Drawing.Graphics object. I have seen examples that use Get/SetPixel in a loop, which are too slow. The method that interests me is one that uses only BitBlits, like this. I just can't get it to work ...

Generating a picture/graphic of a graph

In working on a shortest path algorithm across a network I would like to generate a picture of the network. I'd like to represent nodes (circles), links (lines), cost to traverse the link (number in the middle of the link line), and capacity of the link (number on the link line next to the node it represents) in the picture. Is there any...

Custom component redraw issue with Delphi

I have written a new custom component derived from TLabel. The component adds some custom drawing to component, but nothing else. When component is painted, everything works fine. But when the redraw is needed (like dragging another window over the component), "label part" works fine but my custom drawing is not properly updated. I'm bas...

wxWidgets: Is there any way to avoid or to speed up wxBitmap::ConvertToImage() ?

To get some smooth graphics, I want to draw oversampled by factor 2 and scale down afterwards. So what I am doing is to draw oversampled on a wxBitmap in a wxMemoryDC, and then scale it down before copying to my dc. The code below works fine, but bitmapOversampled.ConvertToImage(); is extremely slow. Is there any way to achieve the sam...

I Need to write a program to draw a graph using HP PCL 5e/HP/GL2

I have read an example and tried to duplicate it's methods but with weird results. This is a 1 shot deal so I do not want to buy a package to do this. Also, it will be executed on a Multi-Valued database in a Basic that not many programmers write in anymore. If anyone can post a small example of this It would be most helpful. Specificall...