graphics

How to draw a graph in PHP?

Hey I want to draw a graph(Stdent mark distribution) in my site based on PHP. How can I do this? ...

Find most readable colour of text that is drawn on a coloured surface

I'm not sure how to ask this but here goes. I draw a filled coloured rectangle on screen. The colour is in form of R,G,B I then want to draw text on top of the rectangle, however the colour of the text has to be such that it provides the best contrast, meaning it's readable. Example: If I draw a black rectangle, the obvious colour f...

Rendering to a single Bitmap object from multiple threads

What im doing is rendering a number of bitmaps to a single bitmap. There could be hundreds of images and the bitmap being rendered to could be over 1000x1000 pixels. Im hoping to speed up this process by using multiple threads but since the Bitmap object is not thread-safe it cant be rendered to directly concurrently. What im thinking i...

Bump Mapping on the iPhone

Using OpenGL ES on the iPhone, is it possible to do bump mapping (using normal perturbation maps)? From my google searching, it seems the OpenGL ES extension that supports it doesn't allow bump mapping. According to this guy that writes gaming middleware for the iphone, one can see the potential of the hardware by watching demos on th ...

WPF - ScreenSaver graphics performance improvements

I took this WPF-VS2008 ScreenSaver template and started to make a new screen saver. I have some experience with winForms-platform (GDI+) screen savers, so i am little bit lost with WPF. Background-element for my screen saver is Canvas. A DispatcherTimer tick is set to 33 msec, which is ~ 30 FPS. Background-color is just one huge Linea...

Setting up glFrustumf in OpenGL ES..

I am having some trouble getting a perspective set up in OpenGL ES. Anyone have any tips? My ortho project looked like this: glOrthof(-8.0f, self.frame.size.width, -12.0f, self.frame.size.height, -8.0f, 20.0f); How can I get a similar set up with glFrustumf? ...

Print designers moving to web ... what do they need to know?

I'm trying to compile a guide for students used to publishing in print who are learning web design. Some obvious things which web developers know but they don't: You can't rotate graphics in HTML All objects have to be rectangular, you can't have a circular DIV Many typographical effects in their repertoire can't be achieved Some th...

Copy one Bitmap onto a larger Bitmap using without using Graphics.DrawImage

This is a follow up from http://stackoverflow.com/questions/648975/rendering-to-a-single-bitmap-object-from-multiple-threads What im trying to achieve is to take a bitmap of say 50x50 pixels and draw it onto a larger bitmap(100x100 pixels) at any point on the larger image, using the bitmaps LockBits function or any other but NOT graphic...

Graphics.drawImage() in Java is EXTREMELY slow on some computers yet much faster on others

I'm having a strange problem, basically in Java Graphics.drawImage() is extremely slow on some computers and faster on others. This isn't related to the computers power either, some weaker computers run it fine while some stronger ones seem to choke up at the drawImage call. It may or may not be related to the width and height, I have a...

winforms newbie trying to get into wpf, looking for resources

I am brand new in the world of Wpf, and am thinking it's time to get into it for my next project. I'm a hardcore Winforms guy. Many of my projects perform tons of custom drawing - for example drawing a virtual baseball strike zone and then drawing icons to represent pitches thrown by a pitcher or seen by a batter. The pitches are in...

Change the alpha value of a BufferedImage?

How do I change the global alpha value of a BufferedImage in Java? (I.E. make every pixel in the image that has a alpha value of 100 have a alpha value of 80) ...

how to use an animated gif file in iphone application

i have an animated gif file and i want to use in my iphone application,but the animation doesnt work,anybody know how to fix it? ...

How to use GL_REPEAT to repeat only a selection of a texture atlas? (OpenGL)

How can I repeat a selection of a texture atlas? For example, my sprite (selection) is within the texture coordinates: GLfloat textureCoords[]= { .1f, .1f, .3f, .1f, .1f, .3f, .3f, .3f }; Then I want to repeat that sprite N times to a triangle strip (or quad) defined by: GLfloat vertices[]= { -100.f, -100.f, ...

I need an graphical Editor to create PNG files with alphatransparency

Unfortunately, Photoshop currently is the only graphical editor I can use to create PNG files with alphatransparency. I really hate it. But I need it. But can't afford it. Pixelmator looked so good, but it crashes over and over again. On my brand new MacBook Pro. Really, that's not an option. Gimp: It crashes imediately after start. A...

What is the best and easy to use graphics library available for C#?

I need an open-source based graphics library to generate jpg graphics from database such as data from MS SQL server. I guess where the data coming from does not matter. The graphics will be something like trend for curve, bar, pie... What I found are couple of libraries available such as NPLOT and ZedGraph, Before I roll my leef on thos...

Error, Implementing Winding Number Algorithm, (OpenGL, C++)

Hi, I am trying to implement the Winding Number Algorithm to test if a point is within another polygon. Although the results from my algorithm are wrong and not consistent. I have been working on this for ages now and it has become a bit of a pain! I have basically converted pseudo code from notes and websites, such as, softsurfer.com...

A Simple, 2d cross-platform graphics library for c or c++?

As in title, i need a 2d graphics library that is cross-platform, and provides simple functions, like in Basic; essentially, i only need to paint a pixel a certain color-I do not need hardware acceleration, or any kind of 3d support. I've found a couple ones, but they're not cross-platform. Anyone knows a solution for me? ...

skew matrix algorithm

I'm looking for skew algorithm, just like on photoshop, edit->transform->skew is there any simple matrix which could do that? what I've seen so far was basic skew matrix (shear) but its lack of control point, doesn't like on photoshop which have at least 4 points on each corner of rectangle and we can move each control point freely. I ...

Which JavaScript graphics library has the best performance?

I'm doing some research for a JavaScript project where the performance of drawing simple primitives (i.e. lines) is by far the top priority. The answers to this question provide a great list of JS graphics libraries. While I realize that the choice of browser has a greater impact than the library, I'd like to know whether there are a...

Create static graphics files (png, gif, jpg) using Ruby or Python

I'd like to create a graphic image on the fly based on user input, and then present that image as a PNG file (or jpg or gif if necessary, but PNG is preferred). This is actually for an astrology application; what I'd like to do is generate the chart in PNG for display. Python or Ruby is fine; in fact, the library available may determin...