graphics

TStatusBar flickers when calling Update procedure. Ways to painlessly fix this...

So, here is the discussion I have just read: http://www.mail-archive.com/[email protected]/msg02315.html BeginUpdate and EndUpdate is not thi procedures I need ... Overriding API Call? I tried to get Update procedures code from ComCtrls unit, nut did not found... Maybe you could post here a code to fix thi flicker of statusbar comp...

How to convert array of bytes into Image in Java SE

Hi, What is the right way to convert raw array of bytes into Image in Java SE. array consist of bytes, where each three bytes represent one pixel, with each byte for corresponding RGB component. Can anybody suggest a code sample? Thanks, Mike ...

How to calculate the Rect of a row of N boxes filling up a length L with S space between them

This problem must have been solved a million times, but Google has not been my friend. I need to programmatically space a set of boxes to fill a certain length and be separated by a certain distance. This is what I want: Here is what I'm getting: Since I'm working in Objective-C using Core Graphics, I need a series of Rects that...

Connecting Catmull-Rom splines together and calculating its length?

I'm trying to create a class which takes in any number of points (position and control) and creates a catmull-rom spline based on the information given. What I'm doing - and I'm really unsure if this is the right way to do it - is storing each individual point in a class like so: class Point { public: Vector3 position; Vector3 control...

3D Graphics Tutorials

I want to start writing simple iphone apps to simulate in 3D things like rolling dice, playing billiards, dropping objects from a certain height, throwing a ball, etc. Just basic motion simulation in 3D. I've searched and searched for a tutorial that would get me started here without success. A perfect intro tutorial for me would be a...

drawing Graphics performance issue

i am trying to create slider movement graphics. The code explain better this. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; namespace temp { public partial class Form1 : Form { ...

Anyone know a good tool (ASP.NET or compatible) for generating Sprites and the corresponding CSS from a set of images?

I'm at the end of an ASP.NET project and we've been using YSlow to analyze our site. There are a ton of images and we'd like to combine some of them into a single request. Any suggestions? ...

What IDE should I use for Java Graphics?

I have had 2 courses in Java programming. We only used a pico editor on a sun server. I am transferring schools but they asked me to cover several chapters on Java graphics before my Advanced Java classes this fall. What options do I have for free or cheep IDEs to use for Java graphics? ...

2D smoke/fire/mist algorithm

Where can I find a good algorithm, or where is just a good place to start, to implement real-time, non-interactive smoke or fire or mist, in 2D? I've come across this simple one and this complex 3D one but I was hoping for something in between. Anyone know of any good algorithms? ...

line drawing routine

How to optimize this line drawing routine ? Will memcpy work faster ? void ScreenDriver::HorizontalLine(int wXStart, int wXEnd, int wYPos, COLORVAL Color, int wWidth) { int iLen = wXEnd - wXStart + 1; if (iLen <= 0) { return; } while(wWidth-- > 0) { COLORVAL *Put = mpScanPointers[wYPos] + wXS...

Example models with texture coordinates?

I'm writing a small OpenGL demo and I would really like to show some example models with textures. The trouble is I have a really tough time finding such models. There are tons of repositories of 3D models in various formats but it seems that only a small fraction of them have texture coordinates. I'm looking for find some well known st...

Resizing Image Quality Reduction

Hi, I have written a simple PhotoEditor helper class to downscale and crop images uploaded to my website. Everything is working but I am seeing unsatisfactory quality when the image is saved to file. I have read up on the different settings you can tweak below is my setup for resizing, cropping is identical. public Image ResizeImag...

Where is the textmode video buffer if it isn't at 0xB8000 ???

About 15 years ago, I used to amuse myself and annoy my CS teacher by writing bad code that would directly modify the text on the monitor. This was/is easily done by accessing video memory at 0xB8000 on VGA-equipped PC-compatibles. Fast forward to today, I decided to try out my old trick through a debug port that gives me access to rea...

How to Create Great Looking Buttons in .Net?

I work on C# window 05 and I want to create some great looking buttons like Vista's theme buttons, Animated buttons, or like any custom of VS05 buttons.... How can I create custom buttons like this on window platform? ...

GD Image library: Range of colour component arguments for TrueColor images

I'm trying to output a TrueColor image using GD (specifically bgd.dll) from a C++ program under windows. The API (or at least the examples) seem to suggest that the range of the integer RGB arguments for gdResolveColor spans the values 0-255. Is this correct? I've experimented with higher values and gotten strange results but this coul...

Capturing print output as vector format (PDF,SVG,EMF,etc.)

BACKGROUND I am using a commercial application on windows that creates a drawing This application allows only two output options: (1) save as a bitmap file and (2) print to a printer the bitmap is useless for my purposes - I want the vectors Looking at the print output (I sent to the Windows XPS print driver) it seems clear based on th...

Need C# function to convert grayscale TIFF to black & white (monochrome/1BPP) TIFF

I need a C# function that will take a Byte[] of an 8 bit grayscale TIFF, and return a Byte[] of a 1 bit (black & white) TIFF. I'm fairly new to working with TIFFs, but the general idea is that we need to convert them from grayscale or color to black and white/monochrome/binary image format. We receive the images via a WCF as a Byte[], ...

WPF : using a designed vector image as a control template in WPF

Hi, I am exploring the idea of using professionally designed vector images as the ControlTemplates in my WPF application. The idea is to make several types of controls, each with a different visual design, which can then be dragged and dropped. This is exactly the same use-case as a visual designer (a'la visio) I have the following XAM...

java graphics - a shape with two colours

Hi, (this is java) I have an oval, representing a unit. I want the colour of the oval to represent the unit's health. So a perfectly healthy unit will be all green. and with the unit's health decreasing the oval starts filling with red from the bottom. so, on 50% health the oval would be red in bottom half and green in the top half, and ...

How would you implement a perfect line-of-sight algorithm?

Disclaimer: I'm not actually trying to make one I'm just curious as to how it could be done. When I say "Most Accurate" I include the basics wall distance light levels and the more complicated Dust in Atmosphere rain, sleet, snow clouds vegetation smoke fire If I were to want to program this, what resources should I look into an...