ok, I see you did update lcd_ to glcd_ in your files...

If you have time... and I'm trying to make it as easy as possible for
you. I wrote "pixel based" block write procedures that should work on
your glcd with your cache. It is pixel by pixel inside
(glcd_write_pixel), but you can edit to be efficient for your glcd,
maybe even just as efficient as your current procedures.

These two procedures get defined in the glcd device library. This will
allow you to draw 8x12 font, glcd_clear_screen, and images (when 1 bit
images are supported) using glcd_common. You will not be able to draw
fonts that do not match GLCD_BLOCK_WRITE_TYPE, I haven't looked into
this yet.

Of course, I don't know much about your lcd, so I don't know for sure
if this will be useful to you in the end.

Adding these things will activate some new stuff in glcd_common. I
keep my fingers crossed that it will be easy for you to test!

You will need these constants with these values:
const GLCD_USE_BLOCK_WRITE = TRUE -- to go in your sample (somewhere
before glcd_common) or in your glcd device lib
const GLCD_BLOCK_WRITE_TYPE = FONT_TOP_LEFT_HORIZONTAL -- efficient
drawing type, to go in your glcd device lib

And these 2 procedures to go in your glcd device lib:

-- set x1,y1,x2,y2 address for block write
var byte glcd_x1, glcd_x2, glcd_x1_start
var byte glcd_y1, glcd_y2
procedure glcd_block_set_address(byte in x1,byte in y1,byte in x2,byte
in y2) is
   glcd_x1 = x1
   glcd_x2 = x2
   glcd_y1 = y1
   glcd_y2 = y2

   glcd_x1_start = glcd_x1
end procedure

-- draw a color for block write. glcd_block_set_address must be called
first, then this proc many times to fill the block.
procedure glcd_block_write_color(byte in color) is
   var byte save_color = glcd_pen_color

   glcd_pen_color = color
   glcd_write_pixel(glcd_x1, glcd_y1)

   glcd_x1 = glcd_x1 + 1

   if glcd_x1 > glcd_x2 then
      glcd_x1 = glcd_x1_start
      glcd_y1 = glcd_y1 + 1
   end if

   glcd_pen_color = save_color
end procedure

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to