com.taobao.gcanvas.adapters:img_fresco

This package is the Fresco implemation of GCanvas image adapter.

License

License

GroupId

GroupId

com.taobao.gcanvas.adapters
ArtifactId

ArtifactId

img_fresco
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

aar
Description

Description

com.taobao.gcanvas.adapters:img_fresco
This package is the Fresco implemation of GCanvas image adapter.
Project URL

Project URL

https://g-platform.github.io
Source Code Management

Source Code Management

https://github.com/alibaba/GCanvas

Download img_fresco

How to add to project

<!-- https://jarcasting.com/artifacts/com.taobao.gcanvas.adapters/img_fresco/ -->
<dependency>
    <groupId>com.taobao.gcanvas.adapters</groupId>
    <artifactId>img_fresco</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.taobao.gcanvas.adapters/img_fresco/
implementation 'com.taobao.gcanvas.adapters:img_fresco:1.0.1'
// https://jarcasting.com/artifacts/com.taobao.gcanvas.adapters/img_fresco/
implementation ("com.taobao.gcanvas.adapters:img_fresco:1.0.1")
'com.taobao.gcanvas.adapters:img_fresco:aar:1.0.1'
<dependency org="com.taobao.gcanvas.adapters" name="img_fresco" rev="1.0.1">
  <artifact name="img_fresco" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.taobao.gcanvas.adapters', module='img_fresco', version='1.0.1')
)
libraryDependencies += "com.taobao.gcanvas.adapters" % "img_fresco" % "1.0.1"
[com.taobao.gcanvas.adapters/img_fresco "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
com.taobao.gcanvas.adapters : img jar 1.0.0

Project Modules

There are no modules declared in this project.

GCanvas

GCanvas is a cross-platform rendering engine for mobile devices developed by Alibaba. It is written with C++ based on OpenGL ES, so it can provide high performance 2D/WebGL rendering capabilities for JavaScript runtime. It also has browser-like canvas APIs, so it's very convenient and flexiable for use, especially for web developers.

Supported operating systems are Android 4.0+ (API 14) and iOS 8.0+.

Distribution

GCanvas

  • iOS GCanvas CocoaPods Version

  • Android com.taobao.gcanvas:core:1.1.0(publishing)

GCanvas NPM Package

Features

  • Cross-platform, support popular iOS and Android.
  • High performance, accelerate graphic draw by OpenGL ES.
  • Provide JavaScript runtime, such as Weex and ReactNative. convenient to use JavaScript API like HTML canvas.
  • Scalable Architecture, easy to implement a GCanvas bridge by yourself following the guide Custom Native Bridge .
  • Small size.

Introduction

See the Introduction to GCanvas for a detailed introduction to GCanvas.

Getting Started

We will continue to maintain the C++ core engine. And will no further update and support WeexReactNative and JS bridge.

Node

Follow Node Guide, use GCanvas in Node.js.

JavaScript

Try our Playground. GCanvas has browser-like canvas APIs, so almost all of the APIs are exactly same as HTML5 canvas. At this moment, we have already supported 90% of 2D APIs and 99% of WebGL APIs. You can find out those informations in 2D APIs and WebGL APIs.

Documentation

Check Documentation for more information.

Examples

We take Weex as example, code snippet of context 2d using GCanvas.

import { enable, WeexBridge, Image as GImage } from "@gcanvas/core";

var gcanvas = enable(this.$refs.canvas_holder, {bridge: WeexBridge});
var ctx = gcanvas.getContext("2d");
//rect
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, 100, 100);

//rect
ctx.fillStyle = 'black';
ctx.fillRect(100, 100, 100, 100);
ctx.fillRect(25, 210, 700, 5);

//circle
ctx.arc(450, 200, 100, 0, Math.PI * 2, true);
ctx.fill();

var image = new GImage();
image.src = 'https://gw.alicdn.com/tfs/TB1KwRTlh6I8KJjy0FgXXXXzVXa-225-75.png';
image.onload = function(){
  ctx.drawImage(image, 100, 300);
};

Built With

  • Freetype - Used for font rendering on Android

Changelog

New Changelog record in CHANGELOG for details.

Open Issues

If you encounter a bug with GCanvas we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of GCanvas and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too.

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Authors

GCanvas Open Source Team

License

This project is licensed under the Apache LICENSE

com.taobao.gcanvas.adapters

Alibaba

Alibaba Open Source

Versions

Version
1.0.1
1.0.0
0.0.1