drawing

How to cache lines to a CGLayer? iPhone Programming

Hello there, I'm having performance issues when drawing with CoreGraphics in my iPhone application, the Idea is to draw a line with the finger. Every suggestion I could find on the internet targeting this problem was: "cache the lines to a CGLayer, so that the application doesn't have to redraw all those lines over and over again". No...

forcing a view to draw in cocoa

I have a superview and a subview. Both are custom. During the drawRect of the superview, I am trying to add the subview, create an image from the drawn view, and remove the subview. My code works fine when I run it and start with the subview already drawn in the superview. It seems like adding the subview (during the drawRect) doesnt dr...

Basic drawing tools for .NET application

I need a control that allows loading a picture, performing some basic drawing tasks with it (including adding text, pencil, oval, horizontal and diagonal lines), and exporting it as bitmap. Anything like that available? Thanks ...

Can I determine the self-intersection points of a line created using the .NET C# GraphicsPath class?

I would like to create a line path using the GraphicsPath class in C#, consisting of multiple curves and lines. Would it be possible for me to determine any self-intersecting points of the class, and in the order that they appear? e.g. as an ordered array of points. ...

iPhone Basic Drawing + Socket communication

I took upon myself to create an App that allows the user to draw and as he draws the strokes would be sent to a server via a Socket connection. The app also needs to receive strokes and display them as well. This would be just a demo app for our server, not a serious iPhone app. Any ideas, suggestions would be AWESOME. I started with ...

wpf (too many drawing visuals) cause jittery pan and zoom.

in a canvas, i have around 2000 framework element derived items.. which inturn consist of around a total of 12000 drawing visuals. This canvas represents a 2d view of a complex machine. And this canvas has pan and zoom logic. The drawing comes in a jiffy.. but when the machine/drawing is fully loaded.. then the pan and zoom is very j...

Writing a "Brushes" quality drawing app, need book and resource recommendations

I've spent about a week reading all the freely available information on iPhone drawing, animation, and OpenGL. Using the available iOS drawing examples like Apple's GLPaint and Quartz sample apps I've written a few versions of a painting tool, but I've hit many limitations which I think is due to "not knowing what I don't know." Quartz ...

iphone drawing context question

Hi there. I am not trying to draw on a component I am simply trying to create a new context (I think) and spit out a UIImage with the contents of my drawing on it. I'm not trying to draw on any existing component. I am using the following code: CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapC...

C#: Draw one Bitmap onto Another, with Transparency

I have two Bitmaps, named largeBmp and smallBmp. I want to draw smallBmp onto largeBmp, then draw the result onto the screen. SmallBmp's white pixels should be transparent. Here is the code I'm using: public Bitmap Superimpose(Bitmap largeBmp, Bitmap smallBmp) { Graphics g = Graphics.FromImage(largeBmp); g.CompositingMode = Comp...

Timage Transparencies on laptops in Delphi 7

WHAT I AM TRYING TO DO I am trying to draw multiple graphics to a Timage, These graphics that i Draw consist of ordered layers with Foodfills and lines. I use multiple buffers to ensure ordering and double buffering. WHAT I AM DOING procedure DrawScene(); var ObjLength,LineLength,Filllength,Obj,lin,angle,i:integer; Npoints : a...

drawing layout through canvas

I have a layout like : <ll vertical> <ll horizental> <textview></textview> <textview></textview> </ll> <ll horizental> <textview></textview> <textview></textview> </ll> </ll> The problem is i need to display this as part of my whole screen. i am doing mCustomDrawableView = new CustomDrawableView((Context)this, R.drawable.mychar...

gtkD: Minimal Drawing Example?

I'm a fairly experienced programmer, but new to GUI programming. I'm trying to port a plotting library I wrote for DFL to gtkD, and I can't get drawings to show up. The following code produces a blank window for me. Can someone please tell me what's wrong with it, and/or post minimal example code for getting a few lines onto a Drawing...

Drawing on Image in .NET - how to erase?

I'm planning to allow user drawing shapes and lines on image using mouse. If the background is solid, it's quite easy to build the eraser tool (simply fill with background color). But how to make it with image as background? ...

Effect like Interface Builder connection lines on iPhone

Hi I'd like little bit of help on something. In my app, I have a UITableView which is populated with custom cells that represent images. (i.e. selecting a row displays a picture in an image view). What I would like to do, is have an icon in the custom cell that I could drag to one of a series of image views. Similar to the way you can d...

Custom NSScrollers having weird effect from Core Animation

Hi everyone, I am making custom NSScrollers for use in NSScrollView. But when any of the superviews of the NSScroller gets Core Animation enabled. I get this drawing issue that's a huge nuisance. Whenever i scroll into the corners of the scroll view the scrollers clip. But if a scroller starts out drawing in the corner, the scroller part...

AggPas Delphi Drawing Transparencies

What im trying to do I have a drawing procedure (it works) it draws to a bitmap "OBJmap" it then puts OBJmap into Wholemap,, this all works but there is a issue,, it seems to treat the undefined parts of objmap as white even though objmap and wholemap is set as PF32Bit. and hence when it puts objmap into wholemap i get a white box behin...

Java2D & Image creation

I want to dynamically create some image from Java and save it to a file. As I read in various tutorials, I need to use BufferedImage. But, the BufferedImage constructor requires that the height and width as parameters. But I don't know the final size of my image. How should I create an image with size unknown in advance? There are two ...

Custom shaped Border in WPF

I am trying to create a TabControl which matches the style of an existing tab control I use in WinForms, and one of the features of that is that it has tab button shapes like those found in VS (slant on the left, other edges square). I am just starting out in WPF, so maybe I'm barking up the wrong tree, but I figured I needed to get a B...

How do I call the Pie function?

I have the center point, radius, and angle to draw the pie, but the Pie function takes 4 points as input data. Does anyone have any conversion function or better explanation for this? ...

Gradient backgrounds

When is it recommended to use gradient created by the iphone itself and when is an image the better choice? ...