-- bug fix
-- previous version left bits of previous character in 6th column when
overprinting (or erase with " ")
-- if you make LCD_ink false it might do white text on a black
background, but I have not tested.
--

procedure PlotChar(byte in x, byte in y, byte in ch ) is
var word indx = 0
var byte cx, colIdx
var bit ink
    if (ch > 31)& (ch < 127) then
        indx = indx + 5 * word(ch - 32)
        if LCD_double then
           for 5 loop
               cx = _font_5x7_table[indx]
               if ! LCD_ink then
                  cx = !cx
               end if
               colIdx = 1
               for 8  loop
                   ink = ((cx & colIdx) > 0)
                   PlotPixel(x, y, ink)
                   PlotPixel(x+1, y, ink)
                   PlotPixel(x, y+1, ink)
                   PlotPixel(x+1, y+1, ink)
                   if colIdx < 128 then
                      colIdx = colIdx * 2
                   end if
                   y = y +2
               end loop
               y = y -16
               indx = indx + 1
               x = x + 2
           end loop
        else
            for 5 loop
                cx = _font_5x7_table[indx]
                if !LCD_ink then
                   cx = ! cx
                end if
                BlitColumn (x, y, cx)
                indx = indx + 1
                x = x + 1
            end loop
            if LCD_bold then
                indx = indx-5
                x = x -4
                for 4 loop
                    cx = _font_5x7_table[indx]
                        -- plot in OR mode
                    PlotColumn(x, y, cx, LCD_ink, false)
                    indx = indx + 1
                    x = x + 1
                end loop
                cx = _font_5x7_table[indx]
                if !LCD_ink then
                   cx = ! cx
                end if
                BlitColumn (x, y, cx)
            end if
        end if
    end if
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