njohn
New Member
Posts: 6
|
Post by njohn on Apr 8, 2014 10:58:06 GMT -8
Hi, (Sorry, it's a long post) I'm having problems getting bitmap cells working correctly. In all cases, the Bitmaps are in palette mode. For example, if I have a bitmap that is 64 x 192. To load and use as a singe cell bitmap, in setup() GD.BitmapHandle(0); GD.BitmapSource(0); GD.BitmapLayout(PALETTED, 64, 192); GD.BitmapSize(NEAREST, BORDER, BORDER, 64, 192); GD.cmd_memwrite(0, 12288); GD.load("b13.bin");
Then to draw GD.Vertex2ii(0, 0, 0, 0);
Which works fine. Also, if I modify the load & prepare code to treat as a 3 (64x64) cell bitmap, vertically stacked. GD.BitmapHandle(0); GD.BitmapSource(0); GD.BitmapLayout(PALETTED, 64, 64); GD.BitmapSize(NEAREST, BORDER, BORDER, 64, 64); GD.cmd_memwrite(0, 12288); GD.load("b13.bin");
Then to draw GD.Vertex2ii(0, 0, 0, [0,1 or 2]);
Which also works fine. However, if I use a bitmap, that's 192x64, the same 3 (64x64) cells, but in horizontal grouping. Using the cell feature, no longer draws the correct sub image. I've tried many different combinations, but the only one that works, is the "vertical stack". Further more, in example 19 (Restaurant) at www.ftdichip.com/Support/SoftwareExamples/FT800_Projects.htm The application note has the following statement on page 7 Which fits with my findings. Has anybody else come across this? Or can see an error in my approach? Thanks....
|
|