but the original image looks like this :
http://www.hkrcg.com/skybox/gauge_model1.bmp
The pic uses Adobe Illustrator CS to make it .
using CMYK mode .
I then copy it to Adobe Photoshop CS for further tunings.
I first change to RGB mode .
Add a layer .
Arrange the new layer to the bottom , fill it with color RED ( 255, 0,0 ) #FF0000 .
Then save as 24-bit bitmap in Windows format .
I guess it is about anti-aliasing problem .
My code is as follow :
Code: Select all
string meter_panel_path = Application.StartupPath + "\\..\\..\\res\\gauge_model1.bmp";
DriverType dt = DriverType.DIRECT3D9;
IrrlichtDevice device = new IrrlichtDevice(dt , new Dimension2D(800, 600), 32, false, true, true);
if (device == null)
return;
IVideoDriver driver = device.VideoDriver;
ITexture meter_panel = driver.GetTexture(meter_panel_path);
driver.MakeColorKeyTexture(meter_panel, new Position2D(5, 5));
while (device.Run() && driver != null)
{
if (device.WindowActive)
{
driver.BeginScene(true, true, new Irrlicht.Video.Color(0, 0, 0, 0));
driver.Draw2DImage(meter_panel, new Position2D(100, 20));
driver.EndScene();
}
}
System.GC.Collect();