graphics

OpenGL ES as a 2D Platform

I've seen a lot of bandying about what's better, Quartz or OpenGL ES for 2D gaming. Neverminding libraries like Cocos2D, I'm curious if anyone can point to resources that teach using OpenGL ES as a 2D platform. I mean, are we really stating that learning 3D programming is worth a slight speed increase...or can it be learned from a 2D p...

Seamless Transitions of Scale over large distances (3D rendering)

What is the best mechanism for handling large scale structures and scenes? Examples being a continent with scale cities and geography, or infinity universe style planetary transitions. ...

Crop a child control to a region in .NET WinForms

I am currently designing a user control which will have other controls contained within it. I would like to be able to control the region in which the they are rendered (similar to Graphics.SetClip). Ideally I would like to beable to have them render to an off screen image which I then present to the user as I choose. The last resort ...

Displaying GUI components in Java

Hi guys I have a GUI window that I've created using Netbeans. I then ported the code into my own program so that I can display .png's at my will. However, the GUI components are not displaying, and the window opens up with no size by default. I need the window to initially open up with the GUI components visible, with the window of ...

c# fill everything but GraphicsPath

I have some code that looks like that: GraphicsPath p = new GraphicsPath(); // Add some elements to p ... // ... g.FillPath(bgBrush, p); // where g : Graphics and bgBrush : Brush Which results in something that looks like this: ### | ##| ## | How can I fill the exact complement of the path? Desired output: #| ## | # #|...

Is there an automated tool for making photo-mosaics (using images as pixels)?

I occasionally see portraits and other images which have been redrawn into an abstract form, where each pixel in the redrawn image is actually another, much smaller picture. I am looking for a tool (or library) which can perform this type of transformation automatically. Does something like that exist? ...

turn a line into a rectangle

I have a method that draws a line between two points. This works pretty well, but now I want to make this line into a rectangle. How can I get the points on the left and right side of each of the line points to make it into a rectangle that I can draw? It is almost as though I need to somehow figure out how to get perpendicular lines ...

Cannot save Adobe Illustrations as .pdf files

Hi, I use adobe Illustrator creative suite 3. Now there seems to be a problem. I can't save my Illustrations In the .pdf format, since this format seems to preserve the graphic quality this Is vitally Important to me. If I save the Graphic In .jpef /.gif or png there Is some serious loss of quality so I need to find out a way to get this...

Pointers wanted: How to display image grids / plots with superimposed vector data?

A few years ago I participated in an MFC VC++ project to draw a grid of JPG or TIFF images and superimpose them with vector data of lines and shapes. Something like a plot of 4X6 images of areal photos and lines showing distances and directions between user defined points. What are good ways of doing the same nova days? Would the Silv...

How to mix two ARGB pixels ?

How can I mix two ARGB pixels ? Example Here A is (Red with Alpha) and B is ( Blue with Alpha ). ...

BlackBerry - Exception when creating a graphics object from a bitmap

I am making the following call in my blackberry application (API ver 4.5)... public void annotate(String msg, EncodedImage ei) { Bitmap bitmap = ei.getBitmap(); Graphics g = new Graphics(bitmap); g.drawText(msg,0,0); } And I keep getting an IllegalArgumentException when I instantiate the Graphics object. Looking at the documen...

Is there a good integer only line rasterization algorithm ?

Hello, I've been working on building a simple 3d graphic engine and I'm trying to find a good integer based line rasterization algorithm. ( I'm not trying to re-invent the wheel, I'm trying to get a deeper understanding of wheels). Are there any line rasterizing algorithms that don't rely on any floating point math? Thanks. ...

How do I take C programming beyond the console?

I'm trying to learn some graphics programming using C. What would be the best way for a beginner to start? I'd like to how to make programs that use graphics and images that can be run directly from a command line prompt, and don't rely on a windowing system like X to execute. Thanks, Mike ...

Image in memory compression exception when getting byte array from the Image

Hi, I have a bitmap object which is taking a huge part of the memory at runtime, I want to compress it (JPEG format) in memory then later on use it. I am using this for the compression: MemoryStream ms = new MemoryStream(); oBmp.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); oBmp.Dispose(); oBmp = null; Image ResultImg = Image.FromS...

Procedural skydome

Does anybody know how to or where I can find info related on how to do a procedural skydome? Any help is welcome. ...

Scaling and repositioning cirlces based on Resolution

Hi, We are building an application in Flex where we have to scale and reposition the circles based on the changed screen resolutions. Example: Current resolution: (800, 600) I draw a circle at position (410,290) with radius 10 Now If i change the resolution of screen to (1440, 960) then the circle should be drawn at the same place o...

Antialiased composition by coverage?

Does anyone know of a graphics system which handles composition of multiple anti-aliased lines well? I'm showing a dependency diagram and have a bunch of curves emanating from a point. These are drawn anti-aliased in the usual way, of blending partially covered pixels. So if two lines would occupy the same half of a pixel, the antialia...

Simple Java Display Images

I have a GUI written using netbeans with a few simple components in place. I want to be able to draw images (any file type, whatever's easiest) alongside the GUI components inside the JFrame. Don't have to resize them, just draw them as they are, at the x and y location of my choosing. There will be several images being drawn at each up...

Java 2D game graphics

Next semester we have a module in making Java applications in a team. The requirement of the module is to make a game. Over the Christmas holidays I've been doing a little practice, but I can't figure out the best way to draw graphics. I'm using the Java Graphics2D object to paint shapes on screen, and calling repaint() 30 times a secon...

When does the CPU wait on the GPU?

In an application which is GPU bound, I am wondering at what point the CPU will wait on the GPU to complete rendering. Is it different between DirectX and OpenGL? Running an example similar to below, obviously the CPU doesn't run away - and looking in task manager, CPU usage (If it were a single core machine) would be below 100%. While...