graphics

How do you create an application with a unique GUI like Valve's Steam?

Valve's game manager application, Steam, has a very unique user interface, with custom buttons and windows. How would you create a Win32 application that has such a look? ...

create statistics on image (e.g. mostly used color...)

Hello, Sorry if the question is a bit vague but I'm new to gd. I'm wondering whether gd already has some built-in methods or whether PHP classes relying on gd exist that could present me with a bunch of statistics for a given image. I'm mostly interested in: Colors (nb of colors used, most used colors, even better if I can get a the n...

Fastest Way to Draw a Static Image in Java

I'm in the process of writing a custom heatmap generator. I'm wondering what the fastest way is to draw boxes (up to around 1 million) in Java. Most questions I've found have concentrated on dynamic images (like in games), and I'm wondering if there's a better way to go for static images. I've tried using swing (via a GridLayout and addi...

How to draw an incomplete Polygon using Java

What I am looking to do is to draw an incomplete polygon using Java. I have figured out how to draw only the polygon in one shot, or even fill the polygon. I can also draw the incomplete polygon by using line segments but the problem with this is the BasicStroke.JOIN_BEVEL does not apply to line segments. Here is how I do it with the lin...

Plotting a smoothed area on a map from a set of points in R

Hi, how do I plot an area around a set of points on a map in R? e.g. map('world') map.axes() p <- matrix(c(50, 50, 80, 100, 70, 40, 25, 60), ncol=2) # make some points points(p, pch=19, col="red") polygon(p, col="blue") ... which gives me a polygon with a vertex at each of the points, but it looks rather crappy. Is there any way to "...

API's similar to GLUTesselator?

I'm looking for an API that is open sourced and that can take contours of verticies as input and return verticies of triangles. I would also like it to support different winding rules. Thanks ...

GLSL shader loader problem

The problem is that my glsl loader does not work and i dont see what im doing wrong. void cShader::Load(const char *v_filename,const char *f_filename) { char *vs,*fs; vShaderList = glCreateShader(GL_VERTEX_SHADER); fShaderList = glCreateShader(GL_FRAGMENT_SHADER); std::ifstream v_fs; v_fs.open(v_filename,std::ios::binary); ...

Update Android SurfaceView on-the-fly with new elements

I have a database filled with records in the following format: . What I want my application to do is select records from an external database, and display those records on the phone screen using a SurfaceView. Currently, I have an Activity, and a Service responsible for the record-gathering portion of the application. The Activity pass...

balancing a scale

Hey guys i have a formula the percentage of cals_in vs cals_out (out of 200%) i created a scale to show the difference in the values in terms of percentage. The problem is I wanna convert the difference in terms of pixels height to move the scale up or down function setScalesToValue(fValue) { document.getElementById("cals_in").styl...

Detecting available graphics memory on the windows platform using C++

I'd like to be able to detect how much graphics memory is available. I've written a C++ project that uses DirectShow. Some ancient gfx cards can't do video properly and fall back to four colour mode. If I try to allocate more than one video window, the program just crashes on these machines without warning. This is less than elegan...

Looking for details on the PixelOffsetMode Enumeration in .Net, WinForms.

The possible values of PixelOffsetMode are: Invalid Default HighSpeed HighQuality None Half I'm guessing that HighQuality = Half, HighSpeed = None and Default = HighSpeed. If this is true then, like the SmoothingMode, I can offer just two simple options. Does anyone know if this is correct and, if so, where on earth did you find ...

Graphing / Visualising XML file structure.

I'm doing some research with large XML based datasets, and I wanted a simple way to get my head around the (vague and almost obfuscated) data structures but graphing the xml nodes. I was going to write a perl script that would re-parse the xml into a GraphViz Dot compatible file, but before I dive into that; anyone got any better ideas?...

SVG linear gradient from hue 0 to 360

What a proper way to do a gradient like this? I tried this SVG: <linearGradient id="hue" x1="0" y1="1" x2="0" y2="0"> <stop offset="0%" stop-color="#ff0000"/> <stop offset="17%" stop-color="#ffff00"/> <stop offset="34%" stop-color="#00ff00"/> <stop offset="50%" stop-color="#00ffff"/> <stop offset="66%" stop-color="...

Has anyone created a 3D website that works on a 3D monitor?

Hi, I stumbled upon this site http://www.swell3d.com/ and I think that in the future we will have a new hype word "3d website" that is used heavily in marketing. However, what I am interested in is how to create such designs/layouts? How is that funny-looking effect actually applied -- and are there any w3 specs describing ways to detec...

Which graphics library?

Can someone reccommend to me a graphics library that meets the following needs: Can be used with either C# or Python The basic functionality that I need is to be able to draw lines and polylines, and to be able to fill in geometric 2d shapes with any colour. Something easy to use that doesnt require hours of reading documentation to un...

Draw multiple shapes using loop - Android Canvas

Hi, I am very new to android development and have been trying to draw a square comprised of multiple smaller rectangles of different colours... Like a Mosaic essentially. Basically at the moment I am reading values from a file which assigns the colour to the smaller Rects. I am using a pair of nested for loops to try to draw the small...

How do you count registers in HLSL?

With shader model 2.0, you can have 256 constant registers. I have been looking at various shaders, and trying to figure out what constitutes a single register? For example, in my instancing shader, I have the following variables declared at the top, outside of functions: float4x4 InstanceTransforms[40]; float4 InstanceDiffuses[40]; ...

How can I improve the "smoothness" of a 2D side-scrolling iPhone game?

I'm working on a relatively simple 2D side-scrolling iPhone game. The controls are tilt-based. I use OpenGL ES 1.1 for the graphics. The game state is updated at a rate of 30 Hz... And the drawing is updated at a rate of 30 fps (via NSTimer). The smoothness of the drawing is ok... But not quite as smooth as a game like iFighter. Wha...

Adjust brightness and contrast of BufferedImage in Java

I'm processing a bunch of images with some framework, and all I'm given is a bunch of BufferedImage objects. Unfortunately, these images are really dim, and I'd like to brighten them up and adjust the contrast a little. Something like: BufferedImage image = something.getImage(); image = new Brighten(image).brighten(0.3); // for 30% ima...

How to show the parallelism of requests in a nice graphical view?

I have currently the following setup: An object graph of all requests read from an application server log file. Each line is represented as a RequestPart, with the following information: start time, stop time, tier, application part that is done. I would like to draw / to graph something that shows the following: Show different col...