mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
fill and stroke support for Sprite
This commit is contained in:
parent
bd910a8bc7
commit
05c90bd45c
@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- RGBA filter. Thanks to [@codefo](https://github.com/codefo)
|
- RGBA filter. Thanks to [@codefo](https://github.com/codefo)
|
||||||
|
- `stroke` and `fill` support for `Konva.Sprite`
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Correct calculation in `getClientRect` method of `Konva.Line` and `Konva.Container`.
|
- Correct calculation in `getClientRect` method of `Konva.Line` and `Konva.Container`.
|
||||||
|
7
konva.js
7
konva.js
@ -13629,6 +13629,13 @@ var Konva = {};
|
|||||||
height = set[ix4 + 3],
|
height = set[ix4 + 3],
|
||||||
image = this.getImage();
|
image = this.getImage();
|
||||||
|
|
||||||
|
if (this.hasFill() || this.hasStroke()) {
|
||||||
|
context.beginPath();
|
||||||
|
context.rect(0, 0, width, height);
|
||||||
|
context.closePath();
|
||||||
|
context.fillStrokeShape(this);
|
||||||
|
}
|
||||||
|
|
||||||
if(image) {
|
if(image) {
|
||||||
if (offsets) {
|
if (offsets) {
|
||||||
var offset = offsets[anim],
|
var offset = offsets[anim],
|
||||||
|
8
konva.min.js
vendored
8
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -95,6 +95,13 @@
|
|||||||
height = set[ix4 + 3],
|
height = set[ix4 + 3],
|
||||||
image = this.getImage();
|
image = this.getImage();
|
||||||
|
|
||||||
|
if (this.hasFill() || this.hasStroke()) {
|
||||||
|
context.beginPath();
|
||||||
|
context.rect(0, 0, width, height);
|
||||||
|
context.closePath();
|
||||||
|
context.fillStrokeShape(this);
|
||||||
|
}
|
||||||
|
|
||||||
if(image) {
|
if(image) {
|
||||||
if (offsets) {
|
if (offsets) {
|
||||||
var offset = offsets[anim],
|
var offset = offsets[anim],
|
||||||
|
Loading…
Reference in New Issue
Block a user