Karsten Sosna
2007-07-14 06:25:37 UTC
Hello NG,
first of all, i use DirectX9Managed. I have a bitmap(32 x 1504Pixel, 24Bit).
This bitmap includes 47 Images(32 x 32Pixel). Now i create a Texture and try
to draw a sprite via.
\\\
[Sprite].Draw2D(texture as Texture, srcRectangle As Rectangle,
destinationSize As SizeF, rotationPoint As PointF, rotationAngle As Single,
position As PointF, color As Color)
///
In first time the sourecerectangle is {0, 0, 32, 32} in next times are {0,
32, 32, 32}, {0, 64, 32, 32}, {0, 96, 32, 32} and so on. The destinationsize
is all times {32, 32}. Now if render the images, the sourceimagesizes are
not correct, it seems the sourceheight of the image are to small.
i have look in the documention of DirectX9m, but this overloads are not
documented.
Next i have a problem with transparent colors. The images have a transparent
color(Color.Black). How could i render the sprite with transparentcolor? In
DX7 i gives a ColorKey-Property, i miss that in DX9.
Sorry for my bad english.
Hopping for help.
--
With regards
Karsten
first of all, i use DirectX9Managed. I have a bitmap(32 x 1504Pixel, 24Bit).
This bitmap includes 47 Images(32 x 32Pixel). Now i create a Texture and try
to draw a sprite via.
\\\
[Sprite].Draw2D(texture as Texture, srcRectangle As Rectangle,
destinationSize As SizeF, rotationPoint As PointF, rotationAngle As Single,
position As PointF, color As Color)
///
In first time the sourecerectangle is {0, 0, 32, 32} in next times are {0,
32, 32, 32}, {0, 64, 32, 32}, {0, 96, 32, 32} and so on. The destinationsize
is all times {32, 32}. Now if render the images, the sourceimagesizes are
not correct, it seems the sourceheight of the image are to small.
i have look in the documention of DirectX9m, but this overloads are not
documented.
Next i have a problem with transparent colors. The images have a transparent
color(Color.Black). How could i render the sprite with transparentcolor? In
DX7 i gives a ColorKey-Property, i miss that in DX9.
Sorry for my bad english.
Hopping for help.
--
With regards
Karsten