add demos to README.md
This commit is contained in:
@@ -9,16 +9,37 @@ _The code in `orx-text-writer` was previously found under `openrndr-draw` in the
|
||||
<!-- __demos__ -->
|
||||
## Demos
|
||||
### DemoTextWriter01
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter01.kt)
|
||||
|
||||
This demo features the drawing of a centered rectangle and the addition of styled text inside
|
||||
the rectangle. The application manages the drawing of shapes and implementation of text rendering
|
||||
with specific font and settings.
|
||||
|
||||
The following operations are performed:
|
||||
- A rectangle is created from the center of the drawing bounds.
|
||||
- The rectangle is drawn without a fill and with a white stroke.
|
||||
- A custom font is loaded and applied to the drawer.
|
||||
- A `TextWriter` is utilized to display the text "hello world" inside the rectangle, adhering to
|
||||
specific styling and formatting rules.
|
||||
|
||||
Key Components:
|
||||
- `application` establishes the visual environment.
|
||||
- `Rectangle` provides a way to define the rectangular area.
|
||||
- `drawer` enables isolated operations for drawing elements.
|
||||
- `writer` facilitates text rendering with alignment and spacing adjustments.
|
||||

|
||||
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter01.kt)
|
||||
|
||||
### DemoTextWriter02
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter02.kt)
|
||||
|
||||
|
||||

|
||||
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter02.kt)
|
||||
|
||||
### DemoTextWriter03
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter03.kt)
|
||||
|
||||
|
||||

|
||||
|
||||
[source code](src/jvmDemo/kotlin/DemoTextWriter03.kt)
|
||||
|
||||
Reference in New Issue
Block a user