DelphiX TDXImageList

From: Svein M. Bringsli (svbrings_at_adsl.no)
Date: 05/24/04


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?



Relevant Pages

  • Only Mutants can spell......
    ... conclusion that the ability to spell has a very large ... Some of us, simply cannot spell. ... I was viewing a mental map. ... I was simply looking at a picture, and then reading the locations from ...
    (misc.news.internet.discuss)
  • vb6 - picture box erratic
    ... I have some programs that create simple on-screen maps by drawing gridlines, ... coincidentally) the picture box controls are behaving erratically, ... ALL of the graphics are present in the captured image! ... when I calculate a map repeatedly (I am plotting the position on a stylized map of a user-entered ...
    (microsoft.public.vb.controls)
  • Re: Opportunitys Odometer Clocks Over 10 km Mark
    ... they had more money and mass and development time, ... across a planetary surface in a entirely autonomous mode safely, ... One can picture these things happening in the not-too-distant future, yes, ... if we were to map all of Mars to that level of detail... ...
    (sci.space.history)
  • Re: Need help to create a map
    ... If you want to put images on a form and then allow user to move them about. ... You could use a picture box, and allow user to drag it about by capturing ... I need first guidance to create something, more than the ideea. ... I need to create a map for a room. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Origin of Chinese spoken languages - 2nd evidence
    ... >> at some published sources. ... >writing, and when they sent me the published issue, and the language map ... of Chinese history and prehistory will recongize the data as correct. ... form a good mental picture, to relate that picture to the article's ...
    (sci.lang)