DelphiX TDXImageList
From: Svein M. Bringsli (svbrings_at_adsl.no)
Date: 05/24/04
- Next message: Kalzor: "OO Starter"
- Previous message: gandalf: "Re: Error - "Insufficient Disk Space""
- Next in thread: Nicholas Sherlock: "Re: DelphiX TDXImageList"
- Reply: Nicholas Sherlock: "Re: DelphiX TDXImageList"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 May 2004 18:34:01 GMT
Hi all!
I'm using DelphiX to make a board game (Mertwig's Maze actually.
Anyone heard of it?) I first tried with the original TImage/TPicture
components in Delphi, but I got too much flickering when animating
tokens on the board. After trying DelphiX I got rid of this. Seems to
me like it's ideal for quick and easy DirectX applications.
Anyway, I've run into a problem. I have a DXImageList with several
Maps, and another DXImageList with smaller versions these maps, where
every field on the map has a uniqe color. The idea is that when the
player clicks on a position on the map, I wil get the pixelcolor from
the smaller map with these "one-color-only fields" and then look up
the color in a table to find out what field the player clicked. (For
those of you that wonder why; The map consists of irregulary shaped
fields, so I can't use the coordinate as it is to get the correct
field)
To make a long story short: the problem I have is that I can't find a
way to examine a single pixel in a picture in a DXImageList. I have to
draw the picture ona hidden surface, and THEN check the pixel. It
takes forever (at least, way to long) How can I check what color a
single pixel in a picture in a DXImageList is?
I've tried the obvious
C := DXImageList1.Items[N].Picture.Bitmap.Canvas.Pixels[X,Y]
but this didn't work. Can anyone explain to me where I go wrong?
- Next message: Kalzor: "OO Starter"
- Previous message: gandalf: "Re: Error - "Insufficient Disk Space""
- Next in thread: Nicholas Sherlock: "Re: DelphiX TDXImageList"
- Reply: Nicholas Sherlock: "Re: DelphiX TDXImageList"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|