Update athen introduction to the texteditor authored by Markus Krug's avatar Markus Krug
...@@ -556,7 +556,7 @@ This just iterates thorugh the lines until one is visible and draws it. Drawing ...@@ -556,7 +556,7 @@ This just iterates thorugh the lines until one is visible and draws it. Drawing
```java ```java
gcOff.drawString(line.getContent(), 0, yOffset, true); gcOff.drawString(line.getContent(), 0, yOffset, true);
``` ```
Note the last argument, which tells SWT to only draw the text using a transparent background (we want our annotations to be visible and not overwritten by the background of the text all the time - and the background is a box!) Note the last argument, which tells SWT to only draw the text using a transparent background (we want our annotations to be visible and not overwritten by the background of the text all the time - and the background is a box!) If we want to draw a different Font we only need to provide a setter and delegate the call of ```setFont()``` to our superclass ```Canvas```. This assures that the gc knows this font when drawing!
# A few notes about the rendering # A few notes about the rendering
...@@ -570,8 +570,11 @@ Things that can be made faster: ...@@ -570,8 +570,11 @@ Things that can be made faster:
* Binary search for the wrapping * Binary search for the wrapping
* Only iterate through the visible lines instead of all lines while drawing * Only iterate through the visible lines instead of all lines while drawing
* faster rendering if we have a horizontal scrollbar
Things that are still missing: Things that are still missing:
* Allowing the text to be edited * Allowing the text to be edited
* Respecting left and right margins * Respecting left and right margins
* usage of styleranges
* individual line heights