-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When working with tannus.graphics.LinearGradient and tannus.graphics.GraphicsPath,
vectorizing the Path will result in failure to properly render the gradient on all targets.
On Java and HTML5, only the first Color is shown, and on Flash, only the last.
Example:
package ;
import tannus.display.Window;
import tannus.graphics.GraphicsPath;
import tannus.graphics.LinearGradient;
class App {
/* Main Program Function */
public static function main():Void {
var w:Window = new Window();
var g = w.graphics;
//- Get Path
var p:GraphicsPath = g.createPath();
//- Create gradient
var lg = new LinearGradient([0, 0], [640, 480]);
lg.addColorStop(0, '#FF0000');
lg.addColorStop(0, '#0000FF');
//- Draw Rectangle over entire Window
p.lineBrush = lg;
p.rectangle(w.size.toRectangle());
p.stroke();
p.vectorize();
p.draw();
}
}I strongly suspect that it's as simple as my vectorization algorithm, but since I'm
very eager to create the asset-management system, and the tannus.graphics.Image class,
I will simply file this issue away for a later date.
Metadata
Metadata
Assignees
Labels
No labels