Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:html
  3. CanvasPattern class
CanvasPattern
description

CanvasPattern class

An opaque object representing a pattern of image, canvas, or video.

Created by callingCanvasRenderingContext2D.createPattern on aCanvasRenderingContext2D object.

Example usage:

var canvas = new CanvasElement(width: 600, height: 600);var ctx = canvas.context2D;var img = new ImageElement();// Image src needs to be loaded before pattern is applied.img.onLoad.listen((event) {  // When the image is loaded, create a pattern  // from the ImageElement.  CanvasPattern pattern = ctx.createPattern(img, 'repeat');  ctx.rect(0, 0, canvas.width, canvas.height);  ctx.fillStyle = pattern;  ctx.fill();});img.src = "images/foo.jpg";document.body.children.add(canvas);

See also:

Annotations
  • @Native.new("CanvasPattern")

Properties

hashCodeint
The hash code for this object.
no setterinherited
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setTransform(Matrixtransform)→ void
toString()String
A string representation of this object.
inherited

Operators

operator ==(Objectother)bool
The equality operator.
inherited
  1. Dart
  2. dart:html
  3. CanvasPattern class
dart:html library

[8]ページ先頭

©2009-2025 Movatter.jp