A demonstration of the GoFlow rendering engine using the native macOS backend.
- Window Creation: Native macOS window with Cocoa
- Canvas Drawing: Core Graphics rendering
- Shapes: Rectangles, circles, and lines
- Text Rendering: Using Core Text with custom fonts
- Colors: Full color support with transparency
- Stroke vs Fill: Both filled and stroked shapes
- Animation: Simple animation loop
macOS only:
cd examples/rendering-demo
./build-app.sh
open RenderingDemo.app# Build the binary
go build -o rendering-demo main.go
# Create app bundle
mkdir -p RenderingDemo.app/Contents/MacOS
cp rendering-demo RenderingDemo.app/Contents/MacOS/RenderingDemo
# Run it
open RenderingDemo.app./rendering-demo) won't show the window - this is a macOS requirement for GUI applications.
The demo displays:
- Title and subtitle - Text rendering with different sizes and weights
- Filled rectangle - Blue rectangle with solid fill
- Stroked rectangle - Red rectangle with outline only
- Filled circle - Green circle with solid fill
- Stroked circle - Yellow circle with outline only
- Colored lines - Multiple lines in different colors
- Animated circle - Purple circle (animation placeholder)
- Color palette - All basic colors displayed as swatches
- macOS 10.12+ (Sierra or later)
- Xcode Command Line Tools
This demo uses:
backends/macos- Native macOS rendering backend- Core Graphics (Quartz 2D) - 2D rendering
- Core Text - Text layout and rendering
- Cocoa (AppKit) - Window management
- Close the window to exit the application
This is a basic rendering demonstration. Future examples will include:
- Mouse interaction
- Keyboard input
- More complex animations
- Widget rendering
- Full GoFlow app integration