Re: Suggestion for syntax-colored editors
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 18, 2004
- 475 views
On Tue, 18 May 2004 04:23:11 -0700, Tommy Carlier <guest at RapidEuphoria.com> wrote: > > >posted by: Tommy Carlier <tommy.carlier at pandora.be> > >I see syntax-coloring being used in MEditor, and in the IDE, and probably also >in other apps. I have a little suggestion. > >Blitting bitmaps is faster than drawing text. Why not generate a large bitmap >and draw all the standard keywords in their appropriate color on this bitmap, and >then if you need to draw such a keyword, just blit it from the bitmap to the >editor? Wouldn't this make the syntax coloring faster? I pass. Post a demo which proves it faster. ) Maybe then I'll believe you. I took on Mike's editor and have done very little with the core innards, such as display, concentrated more on up-front additions. To draw this to its logical conclusion, you need a bitmap for every character in every colour, along with the several (standard keywords) you mention side-by-side in one block, plus what next?- one for every variable name in the current source perhaps? MEditor is open source; feel free to modify it and just send the whole kit and cabooble back; I'll sort it out no worries. Yours, Still Somewhat Unconvinced, Pete