> (are block writes some sort of lcd_write_char() refactoring ? I'm continuing > to dive into this...)
This is not only for writing characters, it is also for drawing images or could be to draw a square fast. There is no need to specify x,y on every pixel. For my glcd, it works internally as follows: 1. set the area (box) you wish to draw in with x1, y1, x2, y2 2. draw a color 3. increment x 4. draw a color 5. increment x 6. draw a color 7. increment x 8. reset x, increment y (when x > x2) 9. draw a color 10. back to step 2 (till image is complete) But the glcd does the increments automatically (steps 3,5,7,9), so I only have to set the area then send colors. I have a feeling most color glcd's support this. API is like this: 1. set the area (box) you wish to draw in with x1, y1, x2, y2 2. draw a color 4. draw a color 6. draw a color 9. draw a color 10. back to step 2 (till image is complete) > But, according to me, this should *not* be the default. It is default if you are a glcd library writer. As a user, you must use whatever the library writer has decided. Writing this procedure is not a simple task for any programmer. When writing a new library, you won't have a lcd_write_char procedure at first. The point is to make it easy for others to write/commit new glcd libraries and to make it easy to use glcd_common. Someone writing a new glcd library will have fonts working right away, However, the best thing for the library writer to do is either use a custom lcd_write_char() or to use glcd_common block writes. In your case, a custom lcd_write_char() is best (users default). In my case, glcd_common block writes are best (users default). For a limited knowledge writer, pixel by pixel is best. Any user of his/her library will use the writers default: pixel by pixel. Do you have something else in mind? Matt. -- 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.
