Skip to content

Commit

Permalink
Merge v1.0.2
Browse files Browse the repository at this point in the history
- `PCanvasEvent` now is abstract:
  - `PCanvasClickEvent`: for mouse and touch events.
  - `PCanvasKeyEvent`: for keyboatd events.
- `PCanvasPainter`:
  - Added support to key events
- `PCanvas`:
  - Added support to fill gradient operations.
- Added `PCanvasElement`
  - Base class for personalized canvas elements.
  • Loading branch information
gmpassos authored Dec 7, 2022
2 parents a31c612 + d414be1 commit f99fac8
Show file tree
Hide file tree
Showing 9 changed files with 654 additions and 22 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 1.0.2

- `PCanvasEvent` now is abstract:
- `PCanvasClickEvent`: for mouse and touch events.
- `PCanvasKeyEvent`: for keyboatd events.
- `PCanvasPainter`:
- Added support to key events
- `PCanvas`:
- Added support to fill gradient operations.
- Added `PCanvasElement`
- Base class for personalized canvas elements.

## 1.0.1

- Added interface `WithDimension` to `PDimension` and `PCanvas`.
Expand Down
4 changes: 4 additions & 0 deletions example/pcanvas_example_web/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ class MyCanvasPainter extends PCanvasPainter {
pCanvas.strokePath(path, PStyle(color: PColor.colorRed, size: 3),
closePath: true);

// Fill the right side of the canvas with a linear gradient:
pCanvas.fillRightLeftGradient(pCanvas.width ~/ 2, 0, pCanvas.width ~/ 2,
pCanvas.height, PColorRGB(0, 32, 94), PColor.colorBlack);

return true;
}

Expand Down
1 change: 1 addition & 0 deletions lib/pcanvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
library pcanvas;

export 'src/pcanvas_base.dart';
export 'src/pcanvas_element.dart';
Loading

0 comments on commit f99fac8

Please sign in to comment.