drawing

Delphi Drawing Focus

I'm using the following code to make my form entirely transparent so that clicks can go "through" it to other windows. SetWindowPos( handle, HWND_TOPMOST, 0, 0, 0,0, SWP_NOSIZE or SWP_NOMOVE ); SetWindowLong(form1.handle,GWL_EXSTYLE,WS_EX_TOPMOST or WS_EX_LAYERED); SetLayeredWindowAttributes(form1.handle,RGB(0,0,0),2...

Other ways to resize image than Graphics.DrawImage

Don't ask me why but i can't use this method because I need to create 2 image objects to make it work. I want to be able to resize a single Image object without needing to create another one. Is this possible and how? ...

How to create videos which animate as u draw/write?

An example is here: http://www.youtube.com/watch?v=rDu2A3WzQpo ...

WPF How to disable blend mode? Drawing on top of controls blends the colors like overlay mode.

I'm trying to draw a line on top of an existing control but it blends the colors together. All I find is tutorial on how to make fancy blending mode but all I want is draw a solid color line over my controls but even the solidColorBrush doesn't behave like I want. ...

How to draw a grid in WPF

I'm trying to create a user control in WPF to represent a Go board, which is essentially just a grid of black lines with dots on some of the intersections. At the moment I'm using a Grid control to handle placement of the stones, but one of the difficulties is that the stones are placed on the intersections of the gridlines rather than ...

Some tips for more effective white-boarding?

I am occasionally called upon impromptu to white-board (non-virtually) data flows, architecture diagrams etc., for both a technical and non-technical audience. Unfortunately my drawing skills (and print legibility) are terrible. How can I become more effective at doing this? I am looking for tips on standard symbols and connectors to us...

Is it possible to restore a previous GL framebuffer?

Hi there, I'm working on an iPhone app that lets the user draw using GL. I used the GLPaint sample code project as a firm foundation, but now I want to add the ability for the user to load one of their previous drawings and continue working on it. I know how to get the framebuffer contents and save it as a UIImage. Is there a way for m...

iPhone SDK - How to draw a UIImage onto another UIImage?

I have several rectangular images (in landscape and portrait mode) and want to draw them onto a transparent square image, so that all images became the same size without cropping them. How would I create a transparent UIImage and draw another on top? Thanks for any hints. ...

Form not showing after Invalidate()

For some reason, this code does not actually draw my bitmap file... or show the form. namespace GraphicsEngine { public partial class Form1 : Form { Bitmap[] dude = new Bitmap[3]; Bitmap dude0 = new Bitmap(@"C:\Directory.bmp"); Point renderpoint = new Point(1, 1); public Form1() { dude[0] = new Bitmap(@"C:...

Moving the Text drawn by TextOut() Function

I'm trying to redraw some text I drew on window at x and y coordinates say (100, 100) to a new location (500, 500). when I redraw the text, it doesn't erase the old text at (100, 100) until I refresh the window (like do a minimize and maximum). how can you update the window to display the current text? ...

Gtk Draw Bitmap

I want to draw an image on a window using Cairo. How can I load a bmp or png from disk and create a brush from it? The code below shows where drawing should be made. The expose signal is attached to the window. gboolean OnExpose(GtkWidget *widget, GdkEventExpose *event, gpointer data) { cairo_t *cr; cr = gdk_cairo_create(wi...

Java 2D drawing and editing objects on an image and detecting shapes from images

Could somebody get me started with the following idea: I want to load an image into my java (java swing) application (a floor plan or blue print). Let's say the floor plan image has a white background with 3 shapes on it (a rectangle, a triangle and a circle). The shapes have a black border. The program should detect these shapes and d...

Quartz 2D stroke alignment

Is it possible to adjust the alignment, from the default centered, of a stroke when using kCGPathFillStroke as the drawing mode? For example, when drawing a closed path using: CGContextDrawPath(context, kCGPathFillStroke); The stroke lies 50% outside/50% inside the drawn path. The stroke color has a non-opaque alpha so the net effect...

Using a flash drawing program to create dynamic HTML possible?

I am interested in developing an application where people can draw the background to their personal homepage using a generic flash drawing program (like graffiti app on facebook.. something very simple). I have little/no experience with flash, but I assume I could simply output the drawing as an image file and have that be the background...

Fog drawing using Core Graphics

I know that OpenGL has functionality that allow fog drawing. But, how to draw fog (smoke) using Core Graphics? Is this hard task? And, what concepts for implementing this task? ...

WPF drawing performance with large numbers of geometries

Hello, I have problems with WPF drawing performance. There are a lot of small EllipseGeometry objects (1024 ellipses, for example), which are added to three separate GeometryGroups with different foreground brushes. After, I render it all on simple Image control. Code: DrawingGroup tmpDrawing = new DrawingGroup(); GeometryGroup onGroup...

Drawing numbers into a panel?

I was wondering if there was already a component available which the user could use the touchscreen to draw numbers into. If not, I was considering an openGL panel which their input would draw onto, and then I'd need some algorithm to interpret the drawing and parse it to a number. Obviously, I'd prefer a component already exist, but am...

Why should I use the InkCanvas in WPF?

In my WPF application I have some drawing functionality. I have solved this using a Canvas and handling mouse gestures manually, and I also add the drawn Strokes (wrapped in InkPresenter) to this Canvas. Using Blend I suddenly discover that there is something called InkCanvas. According to Blend this is a control that "Defines an area ...

How do I draw Microsoft style architecture images?

What software can I use to create architecture drawings like those in the Microsoft Patterns and Practices Application Architecture Guide? ...

onDraw() triggered but results don't show

I have the following routine in a subclass of view: It calculates an array of points that make up a line, then erases the previous lines, then draws the new lines (impact refers to the width in pixels drawn with multiple lines). The line is your basic bell curve, squeezed or stretched by variance and x-factor. Unfortunately, nothing sh...