graphics

multi layer screen like photoshop in .Net

Hello everybody I want to write a utility that it works like Adobe Photoshop. if you work with this product, you meet a capability that we able to create a new layer and modify it easily. now i should write a code that draw a shape in run-time and insert several other shape with own Right-Click options. I don't want specifically it, it...

Debugging image rendering in Visual C++, any helpful add-ins?

I often write code that renders images by writing pixels directly into buffers and I often find it hard to get a good overview of what's really going on. The Memory window in Visual Studio's debugger is somewhat a help, but I'd really love to see the images graphically. So my question is, does anyone know of a debugging extension that c...

How to erase an area in a BitmapData object?

Flex 3, ActionScript 3, Flash player 9. I have a picture in a BitmapData object. And an array of points. I nead to erase the part of the picture inside a polygon specified by the points. In other words, draw a polygon specified by the points and fill it with transparency. Any ideas on how it can be done? ...

Finding the overlapping area of two rectangles (in C#)

Edit: Simple code I used to solve the problem in case anyone is interested (thanks to Fredrik): int windowOverlap(Rectangle rect1, Rectangle rect2) { if (rect1.IntersectsWith(rect2)) { Rectangle overlap = Rectangle.Intersect(rect1, rect2); if (overlap.IsEmpty) return overl...

How do I create a floor for a game?

I'm attempting to build a Lunar Lander style game on the iPhone. I've got Cocos2D and I'm going to use Box2D. I'm wondering what the best way is to build the floor for the game. I need to be able to create both the visual aspect of the floor and the data for the physics engine. Oh, did I mention I'm terrible at graphics editing? ...

Convert Quaternion rotation to rotation matrix?

Basically, given a quaterion (qx, qy, qz, qw)... How can i convert that to an OpenGL rotation matrix? I'm also interested in which matrix row is "Up", "Right", "Forward" etc... I have a camera rotation in quaternion that I need in vectors... Thanks! ...

Rendering vector shapes in Java

I have a series of shapes (Approx. 50), that each have 5 points, and a color (with alpha transparency). I want to render these shapes onto a pixel grid. I program as an amateur, so I have no idea how I should go about doing this. Can someone give me a starting point, or some pseudo-code? Thanks in advance. ...

Is it possible to translate twice in one OpenGL Matrix?

This is a homework question I am sorry but I am lost. What happens is the following I am asked to do a tiling of hexagons. Like the grid map in many Risk games and Wild Arms XF. I understand the current transformation is the matrix that translates the points I give to OpenGL to screen coordinates and if you apply a transformation it move...

2D Triangle in SlimDX

How to draw a triangle using SlimDX's Direct2D interface given triangle vertices are given in pixel coordinates? ...

Fast work with Bitmaps in C#

I need get all pixels from Bitmap, work this they and save them to Bitmap. If I use Bitmap.GetPixel() and Bitmap.SetPixel() then I have very slow program. How I can fast convert Bitmap to byte[] and back? I need byte[] with size (4 * width * height) and contains RGBA of each pixel ...

How do I contract out the design of an ASP.NET MVC Application?

As many of you know MVC applications will have one or more of these View elements. Partial Controls Views Strongly Typed Views And probably others that I don't know yet. As many developers, I am one of those that has no art for design, I can't think about colors, just about logic. I will like to contract out the graphic design of m...

Rendering different triangle types and triangle fans using vertex buffer objects? (OpenGL)

Hello, About half of my meshes are using triangles, another half using triangle fans. I'd like to offload these into a vertex buffer object but I'm not quite sure how to do this. The triangle fans all have a different number of vertices... for example, one might have 5 and another 7. VBO's are fairly straight forward using plain tri...

C# OnPaint mousemove high cpu usage

I have written a custom control that renders some graphics. The graphics itself is fairly expensive to render but once rendered it rarely changes. The problem I have is that if you move the mouse really fast over the graphics surface it keeps calling the control's overridden Paint method which then incurs a high CPU penalty: private voi...

Allow SVG graphics to overflow outside the containing svg element

Hi, I'm using the Raphaël—JavaScript Library to create some pie chart graphics, but I want to set the overflow of the containing SVG element to visible, to allow the graphics inside to display outside of their container. The way you would with normal dom elements (overflow: visible;) does not seem to work for svg containers. Does anyone...

Any code/library to scale down an UIImage?

Is there any code or library out there that can help me scale down an image? If you take a picture with the iPhone, it is something like 2000x1000 pixels which is not very network friendly. I want to scale it down to say 480x320. Any hints? ...

How to get camera up vector from roll, pitch, and yaw?

Hello, I need to get an up vector for a camera (to get the right look) from a roll, pitch, and yaw angles (in degrees). I've been trying different things for a couple hours and have had no luck :(. Any help here would be appreciated! ...

Icons to use in a program generating feeds for Google Search Appliance

We're developing a program that generates search feeds for Google Search Appliance. We would like to use icons that would be associated with Google Search Appliance in the program interface. Is there a list of icons Google officially allows to use in such cases? ...

Should I go 3D for my game? If so, how far and any good tutorials?

Hi all. I have been working on a java simulation game for some time (remaking theme hospital in my own way). Up to now, I have done everything in 2d, using squares and circles etc. I have looked for some tutorials on how to do 3d in java, found coke and code, however I am unsure if this is what i need to use. My idea was either to have s...

Which algorithm does Neatimage use to denoise images?

Which kind of algorithm does Neatimage use to remove noise and grain from photos? I understand that this is proprietary software, but probably someone has an idea. References to publications or to similar algorithms are welcome. ...

What are the graphics editors that can be built upon?

I want to start off with a capable vector graphics drawing/editing program and extend it to create a visual designer for a project I'm working on. Do you know of a graphics editor that can be built upon? Maybe open source? Users should already be able to freely draw and color graphics, and any form of grouping / arranging elements is a...