drawing

Flex + Drawing dynamically

I want to try display a relationship diagram. I have the xml <School> <Class> <Name>1st Grade</Name> <StudentName>A</StudentName> <StudentName>B</StudentName> <StudentName>C</StudentName> <StudentName>D</StudentName> </Class> <Class> <Name>2nd Grade</Name> ...

Drawing text in a NSButton subclass

How would I add the text from the title of the button in my NSButton subclass? ...

Drawing text in a NSButton subclass - positioning

I Have a custom button: And I need the text to be centered, here's my code: NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [style setLineBreakMode:NSLineBreakByWordWrapping]; [style setAlignment:NSLeftTextAlignment]; att = [[NSDictionary alloc] initWithObjectsAndKeys: style, NSPara...

NSShadow with a NSButton subclass

Here's My Code: - (void)drawRect:(NSRect)dirtyRect { // Drawing code here. // Create the Gradient NSGradient *fillGradient = nil; if (mouseIsDown) fillGradient = [[NSGradient alloc] initWithStartingColor:[NSColor colorWithCalibratedRed:0.868 green:0.873 blue:0.868 alpha:1.000] endingColor:[NSColor colorWithCali...

Draw a line grid on a windows form

I need to draw a line grid on a windows form that contains 4 rows and 4 columns. ...

How can I load a Image from a file, then an image to a bitmap?

I have a file location on my file system. I need to first load the file into a System.Drawing.Image, then I need to load the Image into a bitmap. ...

Model Object C#

hey guys, i am working in a compnay for training, and they asked me to do a modeling application. to be clear, i want to code using C# an application that do as same as the "logic works" or "Visio". why dont they use those? because they want to use different items, plus they want it to be stored in a database not as a file with extentio...

Adobe Flash: want a book to teach vector based drawing from beginner to advanced?

I'm looking for a book to teach vector drawing for Flash/Photoshop/Illustrator. Would prefer if the book is up-to-date with the latest versions CS4. I found this useful tutorial here: Graphics Soft, Vector drawing, but I'm looking for a full book, or a learning DVD. ...

How to draw & export a transparent image with Nokia Qt C++ ?

I have a piece of code intended for drawing & exporting a transparent image with Nokia Qt. However, it does not work. I always see black background with lots of noise. I must fill the background with White color but I want transparency, not white color. Please kindly advise. #include <QtGui/QApplication> #include <QtGui> int main(int a...

Drawing abstract canvas

I'm planning to write a diagram editor-style application, where you organize objects on a canvas. This application will need to support setting viewport, zooming, cropping and a lot of other standard features of such a graph style application. I'm looking for toolkits or frameworks which could supports drawing in a standard mathematical ...

A drawing canvas/surface that will look same in any environment?

You develop an application on windows. And deploy it on windows machines. You find it looks neat, since the windows gui system renders quite well. If you want the same app to run under linux or unix platforms they look different. Because the UI system they use might be different. Is there any standard to how for e.g. buttons can look or ...

add TouchListener to Drawable

I want to make a Drawable touchable for a component I am creating, does anyone know how to do that? final Drawable selected = backgroundSelected; selected.setBounds(0, 0, 20, 90); selected.draw(canvas); canvas.save(); ...

android: quality of the images resized in runtime

I want to show images using drawBitmap() method. But before I want to resize it according screen dimensions. I have a problem with quality of result image. You can see screenshots and test code below. How can I resize images in runtime with a good quality? Thank you for solutions. Original image: Result screenshot on device: import...

problem when zooming pictures in wxpython

hello I need to draw over image (to comment over it) in a scrolled panel. I'm having troubles with it since it doesn't behave right when I zoom it in or out. it stops drawing , and then it shows it after a while in a wrong place. right in the upper left corner of the window. and doesn't draw lines correctly . below is the code for the (o...

BlackBerry - How to create a sub image from a larger image?

I need to create a new, smaller, image from a larger image at runtime. The smaller image size is fixed (square) and represents a specific region of the larger image (the smaller image is a subset of the larger image). Image format doesn't matter. Thanks. ...

Making a draw/paint app

I'd like to include a simple draw feature on my app. A friend told me I can't use canvas because I need to control the frame buffer and not redraw the entire screen every for every frame. He suggested I find a openGL 2d engine. I've searched around and I've only found Rokon which doesn't have any documentation and the examples aren't qui...

WPF drawing performance with large numbers of elements

I'm trying to create a custom control in WPF to display the game tree for a game of go (see here for what it looks like). I've more-or-less got it working laying out the nodes, but one problem I've found is that it begins gets noticeably slow to render/navigate (it's in a scroll viewer) when the number of nodes gets larger than about 30....

iphone quartz drawing 2 lines on top of each other causes worm effect

Hi, I'm using Quartz-2D for iPhone to display a route on a map. The route is colored according to temperature. Because some streets are colored yellow, I am using a slightly thicker black line under the route line to create a border effect, so that yellow parts of the route are spottable on yellow streets. But, even if the black line is...

how to drag image in a wxpython frame

hello what is the easiest way to drag an image ( or text) in a wx window ? i need steps or a small example on how to do that. thanx in advance ...

filled rubber band in Winforms Application

how can i draw a zero opacity rubber band over a windows form with 0.3 opacity? (The rubber band is made after a Microsoft example Update: I need that rubber band to work something like a mask. If you use Jing or any other screen shot tool, you will see EXACTLY what I need to do when do you try to make a screenshot: the screen goes ...