drawing

How to overlay text or markers on an bmp image

Hi Guys, I'm working with an image processing project where I'm trying to locate features on a .bmp image. I'm writing the whole source code in C. The algorithm I'm developing is going to search for some features, if a desired feature was found by the algorithm then it is going to create a point (x co-ord, y co-ord), now I want to overl...

How to add layers on View?

I'm going to develope a Android program, with a photo display on screen. And there are some text and drawing (circle/Rect) over the photo. The text and drawing will change when use touch on the screen. How can I implement? SurfaceView? ItemizedOverlay? or anything else? Pls. advise. Thx all:) ...

Drawing layers in GDI

Hello, I am creating an application in .NET using winforms. That application must draw on a Panel. Is it possible to paint objects on different layers, and combine that to one image on the panel? One layer has many objects on it. ...

Insane Graphics.lineStyle behavior

Hi all, I'd like some help with a little project of mine. Background: i have a little hierarchy of Sprite derived classes (5 levels starting from the one, that is the root application class in Flex Builder). Width and Height properties are overriden so that my class always remembers it's requested size (not just bounding size around con...

Ellipse object in GDK

In GDK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses? ...

drawing above gtkentry using cairo

Hi Experts, I want to use cairo to enhance gtkentry look. For this, I have connected a callback to 'expose-event'. In callback, I call gtkentry's original expose-event handler. After that, I create cairo context and draw some lines and destroy the cairo. I return 'TRUE' as return value of callback function so that expose-event does not...

C# Drawing Arc with 3 Points

Hi, I need to draw an arc using GraphicsPath and having initial, median and final points. The arc has to pass on them. I tried .DrawCurve and .DrawBezier but the result isn't exactly an arc. What can I do? SOLUTION: After a couple of hours of code writing I managed to draw what I wanted with this algorithm (give 3 Point a,b,c and a G...

Resizing a drawing area in GTK

My application performs a 90 degree rotation on a drawing area, so the width and height of the drawing area need to be swapped. How can I resize the drawing area with GTK in a way so that the new width and height are actually enforced, not just requested? ...

Scientific Algorithms that can produce imagery, pseudocode perhaps?

Hello, I have a client who is based in the field of mathematics. We are developing, amongst other things, a website. I like to create a mock-up of a drawing tool that can produce some imagery in the background based on some scientific algorithms. The intention being that the client, later, may create their own. (They use emacs for every...

How to effectively draw on desktop in C#?

I want to draw directly on the desktop in C#. From searching a bit, I ended up using a Graphics object from the Desktop HDC (null). Then, I painted normally using this Graphics object. The problem is that my shapes get lost when any part of the screen is redrawn. I tried a While loop, but it actually ends up drawing as fast as the appli...

Optimize a views drawing code

Hi, in a simple drawing application I have a model which has a NSMutableArray curvedPaths holding all the lines the user has drawn. A line itself is also a NSMutableArray, containing the point objects. As I draw curved NSBezier paths, my point array has the following structure: linePoint, controlPoint, controlPoint, linePoint, controlPo...

WPF Canvas - Single Pixel Grid

Hi guys, I have a custom WPF Canvas, upon which I would like to show a grid. I do so by overriding the OnRender method on Canvas, and using the DrawingContext drawing functions. IsGridVisible, GridWidth, GridHeight are the number of pixels between each grid line horizontally and vertically respectively. I also use a ScaleTransform on t...

Why do I not get low memory issues until images are draw on the screen?

I am able to load over 200 UIImage objects into a NSMutableDictionary without any memorry warning issues. When I start displaying them on the screen (after about showing 10-20 images) I get low memory warnings and an eventual crash. Only about 8 images are displayed at anyone time. Does it take additional memory to actually draw a UII...

Clip a 4:3 image in WPF with a circle

I am trying to clip a 4:3 image with a circle within a grid control. I need the circle clip to reveal the image from the middle in a perfect circle. See below. The circle should dynamically re-size with the image. I have tried Canvas.Clip and Ellipse+VisualBrush without achieving the correct behavior. Thanks! ...

Undo button for System.Drawing?

Hi guys, I am making a image editor kinda for own enjoyment and was wondering how could I make a undo button to undo the last paints I did? I want to know how I would about this, a tutorial or sample code would be nice or at least something pointing me in the right direction. Thanks! ...

Android Canvas Coordinate System

I'm trying to find information on how to change the coordinate system for the canvas. I have some vector data I'd like to draw to a canvas using things like circles and lines, but the data's coordinate system doesn't match the canvas coordinate system. Is there a way to map the units I'm using to the screen's units? I'm drawing to a...

Drop shadow coordinate different from iPhone OS 3.2?

I'm trying to draw a custom view with a drop shadow. I'm having different results from iPhone OS 3.2. Has the coordinate system changed for CGContextSetShadowWithColor from 3.2? Here is the code I'm using: CGContextRef graphicContext = UIGraphicsGetCurrentContext(); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloa...

Generic transparent Qt widget that can catch clicks?

I've figured out how to use QPainter to draw rectangles. Now I want to have a drawing area where if the user clicks, a 1x1 rectangle is drawn where the mouse pointer is. To accomplish this, I assume I need a transparent Qt widget that supports the clicked() signal. How do I make such a transparent widget? Or is there something else I ca...

WPF canvas drawing with Graphics

Hi ! I'd like to ask if there is any possibility to draw on WPF Canvas with some kind of a Graphics type providing methods like: DrawLine, DrawPath etc.. (as it was in .NET 2). I know there's a lot of stuff like storyboards etc.. but I'm planning to do all the drawing in code behind and to have just 1 Canvas in WPF without any child ...

Creating a variable-width stroke in Cairo

stroke() in Cairo applies a stroke of a single specified width to a line path. I'd like to draw a path with a varying width (thinner when the user was drawing faster, thicker when slower). Is this possible in Cairo? ...