graphics

How do I create a bitmap with an alpha channel on the fly using GDI?

I am using layered windows and drawing a rounded rectangle on the screen. However, I'd like to smooth out the jagged edges. I think that I'll need alpha blending for this. Is there a way I can do this with GDI? ...

C# Graphics Newbie Question

Good Day, I have some small transparent gif images (under 100x100) and wrote the following code to iterate through all the pixels to give me the RGB values: private void IteratePixels(string filepath) { string dataFormat = String.Empty; Bitmap objBitmap = new Bitmap(filepath); int counter = 0; for (int y = 0; y < objBit...

Bands of blank or improperly rendered scan lines using offscreen rendering with Frame Buffer Objects

I am doing offscreen tiled rendering of very large output images using FBOs. In order to have the best performance, I am trying to create the largest FBO (and thus tile size) that I can. To that end, I am using GL_MAX_RENDERBUFFER_SIZE_EXT to retrieve the maximum possible size and then reducing it so that my FBO does not fill more than 1...

How to change x,y origin of canvas to bottom left and flip the y coordinates?

I have a bunch of data points that I would like to two-way bind to points on a canvas. The points assume larger y values are reflected in an upwards direction like most math graphs. How do I change the x,y origin of the canvas to the bottom left corner and reverse it's interpretation of the y coordinate? (I would like to stay in XAML)...

Deferred Shading DirectX demos?

I've been reading a lot about deferred shading and want to try and get into it. Problem is I can't find a sample which demonstrates how deferred shading can support so many lights simultaneously - I found one demo which was very simple with a single light in Code Sampler and an nVidia HDR sample butnothing beyond that. Would anyone know...

Hardware accelerated Unicode text rendering

I want to write a hardware accelerated text renderer using Free Type 2 to load the fonts, find the correct glyphs and their sizes etc. My plan to do this is to have a large texture containing glyphs (for a given font,size,etc) in video memory, and a table for each texture defining information about the contents of the texture in system ...

what application can I use to create web .ico files on a mac

What Mac OS X (leopard) application can I use to create favicon.ico -like ico files? Note: This is not to create widget icons or the like, but the (e.g. 16x16 pixel) files that appear on a web browser's tab and alongside a bookmark... ...

free javascript widget to show an organigram chart...

I'm looking for a javascript widget to show some fairly complex graphes... Ideally, it would be interactive, that is the user should be able to move around the nodes, select one or many, zoom in, click on a node to see more info, etc... If it could have printing support, that would be marvelous... The idea is to let the user browse th...

'D3DRS_SEPARATEDESTALPHAENABLE' : undeclared identifier - even though it's mentioned in the DirectX comments?

In d3d9types.h in the _D3DRENDERSTATETYPE struct the last 3 types are: D3DRS_SRCBLENDALPHA = 207, /* SRC blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */ D3DRS_DESTBLENDALPHA = 208, /* DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */ D3DRS_BLEN...

Is it possible to use AnimateWindow with AW_BLEND when using a layered window?

I am displaying a window using UpdateLayeredWindow and would like to add transition animations. AnimateWindow works if I use the slide or roll effects (though there is some flickering). However, when I try to use AW_BLEND to produce a fade effect, I not only lose any translucency after the animation (per-pixel and on the entire image), b...

Best 3D Java Engine

Looking for an easy to use 3D Java Engine API (i.e. not wrapper) that has a good community and good development. Extra features (i.e. audio, input, etc.) are not necessary but nice. List of the most popular Java 3D graphics APIs I found: Wrappers / Low Level Jogl - Strong community / Good support / Active Java3D - Abandoned (or slowl...

C# How to draw in front of objects?

Hi How do you draw a string that is supposed to be on top of everything else? Right now in my panel i have some user controls in Panel1.Controls. So i added this to the Paint method: Graphics g = Panel1.CreateGraphics(); g.DrawString("BUSTED", new Font("Arial", 20f), new SolidBrush(Color.Black), new PointF(50, 50)); The problem is ...

fast algorithm for drawing filled circles?

I am using Bresenham's circle algorithm for fast circle drawing. However, I also want to (at the request of the user) draw a filled circle. Is there a fast and efficient way of doing this? Something along the same lines of Bresenham? The language I am using is C. ...

How to fill color in only a part of the image in iPhone.

Hello all, I am using the following code to fill color in an image in iPhone. - (UIImage *)colorizeImage:(UIImage *)baseImage color:(UIColor *)theColor { UIGraphicsBeginImageContext(baseImage.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGRect area = CGRectMake(0, 0, baseImage.size.width, baseImage.size.height); CGContext...

iphone camerOverlay for use with Alternate Reality applications

Does anyone know a way to take an image captured on the iphone's camera, and do some image processing (e.g. edge detection, skeletization), and then overlay parts of the processed image on the original image (e.g. only the highlighted edges). More generically how do I create a UImage with transparency (do I just scale the image and ove...

Rendering a GUI button in a JPanel

Consider that I have written "File" at the top left corner and then how can I add a button at the top right corner? public class FileViewer extends JPanel { private static final long serialVersionUID = 1L; public void paintComponent(Graphics g) { Graphics2D graphic = (Graphics2D)g; graphic.drawString("HTML ...

Using Java's Graphics or Graphics2D classes, how do I paint a String?

I have a String and I want to paint it onto an image. I am able to paint points and draw lines, however, even after reading the Text part of the 2D Graphics tutorial, I can't figure out how I can take a String and paint it onto my drawing. Unless I'm looking at the wrong tutorial (but it's the one I get whenever I search for anything ab...

Silverlight DataGrid Redraw Issue

I have a Silverlight DataGrid that contains a single template column which displays a user control. The user control has a progress bar to represent processing and when the processing is complete an animation hides the progress bar and shows a finished label. There are two instances in which the datagrid seems not to redraw itself: F...

BlackBerry - image 3D transform

I know how to rotate image on any angle with drawTexturePath: int displayWidth = Display.getWidth(); int displayHeight = Display.getHeight(); int[] x = new int[] { 0, displayWidth, displayWidth, 0 }; int[] x = new int[] { 0, 0, displayHeight, displayHeight }; int angle = Fixed32.toFP( 45 ); int dux = Fixed32.cosd(angle ); int dvx = -Fix...

Real time dynamic shadows to compliment deffered shading?

I currently have a deffered rendering system setup and can render point lights and directional lights. My question is what are my options for different forms of shadowing which can make shadows based on point lights and directional lights which can maybe make use of a deffered shading setup? ...