graphics

Is there a way to organize a icon collection to allow for easy searching?

Is there any way of organizing a icon collection so that it easier to find needed icons? For example: the program needs a save icon there are 5 icons collections on your HD that have a save icon and there are 5 more collections that don't have a save icon (but you don't know that) do you browse through each icon collection? run a se...

CSG operations on implicit surfaces with marching cubes [SOLVED]

I render isosurfaces with marching cubes, (or perhaps marching squares as this is 2D) and I want to do set operations like set difference, intersection and union. I thought this was easy to implement, by simply choosing between two vertex scalars from two different implicit surfaces, but it is not. For my initial testing, I tried with t...

Can draw on only half of UIView

Hello. I am trying to draw grid on a UIView on a UIScrollView. The width of UIView is about 1000 pixels. However, I can draw lines only about first 340 pixels of the UIView. Can anyone help me on this? The drawGrid function is - (void)drawRect:(CGRect)rect { NSInteger width = 25 * 5 * 10; NSInteger height = (10 * 2 + 10) * 12; NSIntege...

How to paint an area of a bitmap with 'transparent white'?

I want to replace all pixels in a rectangular region of a Bitmap with 'transparent white' - i.e., a=0, b=255, r=255, g=255. FillRectangle doesnt do this - given a transparent brush, the existing pixels are unchanged. Do I need to use SetPixel individually for each pixel in the rectangle? ...

Cairomm and Pixmap

When I have all my cairo drawing commnds finihed how can I added it to a pixmap so that it will be drawn later. I am using cairomm and gtkmm ...

Haskell: OpenGL, how to prevent immediate window closing

Hello. Whenever I close OpenGL window it makes ghci console from which the app was started to immediately disappear. Is there a way to prevent this behaviour? A sample app. Thanks. ...

Browser graphics: Java Applet vs Flash vs anything else?

Hello! We sell photoalbums which our customers create theirselves using a client album editor program (for Windows). Now we are going to develop an online program so customers could create their albums in the browser: upload photos and edit them. This is going to be a rich browser application with full graphics support. The problem is ...

Does GdkRectangle have an activate event?

I want to make a GdkRectangle clickable so that I can select it and get a dot in every corner of the rectangle, implying that the user can move or resize the rectangle. Is there an event that triggers when a GdkRectangle is clicked? What's the syntax of the accompanying g_signal_connect command? ...

Set form backcolor to custom color

How can I set a form's backcolor to a custom color (such as light pink) using C# code? ...

Visual Python - Visualize graphs relating to a movement

Hello, everyone! I'm working with visual python on a project where I need to simulate a physical movement. I'd like to present, in a different window than the one the actual, 3D sim is running, two graphs, both related to the movement: How the velocity and angular velocity progress over time. How the movement and rotation progress ov...

Nonblocking texture upload on iPhone and other OpenGL ES platforms

Hello, I am doing some work which involves drawing video frames in real time in OpenGL ES. Right now I am using glTexImage2D to transfer the data, in the absence of Pixel Buffer Objects and the like. A below answer suggests that glTexImage2D is always blocking, even if texture object referenced does is not used for any drawing. Is ther...

How to structure class to support imported 3d model ?

Hello, I've written a C++ library that reads in this 3d model file (collada DAE). uptil now, I would output a list of triangles and handle each of them at rendering stage. But now, I need to attach some Bounding sphere information with the imported model. I need some advice on how should I organize this in code. Here are some specs of...

How does a GUI Framework work?

I have been all over the web looking for an answer to this, and my question is this: How does a GUI framework work? for instance how does Qt work, is there any books or wibsites on the topic of writing a GUI framework from scratch? and also does the framework have to call methods from the operating systems GUI framework? -- Thank you ...

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...

opengl: question about glutMainLoop()

can somebody explain how does glutMainLoop work? and second question, why glClearColor(0.0f, 0.0f, 1.0f, 1.0f); defined after glutDisplayFunc(RenderScene); cause firstly we call glClear(GL_COLOR_BUFFER_BIT); and only then define glClearColor(0.0f, 0.0f, 1.0f, 1.0f); int main(int argc, char* argv[]) { glutInit(&argc, argv); ...

background colour in opengl

I want to change background color of the window after pressing the button, but my program doesn't work, can somebody tell me why, thanks in advance int main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(800, 600); glutInitWindowPosition(30...

Monochrome BitMap Library

I am trying to create a piece of software that can be used to create VERY large (10000x10000) sized bitmaps. All I need is something that can work in monochrome, since the required output is a matrix containing details of black and white pixels in the bitmap. The closest thing I can think of is a font editor, but the size is a problem. ...

How do bezier handles work?

On Wikipedia I found information about bezier curves and made a function to generate the inbetween points for a bezier polygon. I noticed that Expression Design uses bezier handles. This allows a circle to be made with 4 points each with a bezier handle. I'm just not sure mathematically how this works in relation with the formula for b...

3D Mesh Joining

I have 2 (or more) intersecting meshes, which require joining into 1 mesh object. I want to have some control over the resulting seam vertex insertion, so looking to write myself rather than use a library. Has anyone come across some open source code to base the algorithm on / ideas on the process? Initial impressions are: 1. Present in...

Plot ellipse from rectangle

Hey folks, I have been looking all over the Web for a way to plot an ellipse from rectangle coordinates, that is, top-left corner (x, y) and size (width and height). The only ones I can find everywhere are based on the Midpoint/Bresenham algorithm and I can't use that because when working with integer pixels, I lose precisions because t...