Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20110

HTML5-like Canvas API

    XMLWordPrintable

Details

    Description

      It should be possible to procedurally render certain types of graphics, such as graphs, from QML. If possible, the API should be similar to the HTML5 Canvas API to help developers familiar with that migrate.

      Some preliminary work has been done here:

      http://qt.gitorious.org/qt-labs/qmlcanvas
      http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-143

      Ideally this would be extended to:

      Implementation Backlog

      • Add new QSGCanvasItem class
        • Add thread rendering support to QSGCanvasItem
        • Add tiled rendering support to QSGCanvasItem
        • Add asynchronous image loading support to QSGCanvasItem
        • Add QSGContext2DNode for scengraph canvas node management
        • Add QSGContext2DTexture/QSGContext2DImageTexture/QSGContext2DFBOTexture/ canvas item texture management
        • Add QSGContext2DTile for tiled canvas painting
      • Context2D API
        • QSGContext2D class for HTML5 context2d compatible API implementation
          • Add state management API (save, restore, reset) to QSGContext2D
          • Add transformation API (scale, rotate, translate, transform, shear) to QSGContext2D
          • Add stroke/fill style APIs (colors, gradients, patterns) to QSGContext2D
          • Add line style APIs (line width, cap, join. miterlimit) to QSGContext2D
          • Add shadow APIs(offsetX, offsetY, shadowColor, shadowBlur) to QSGContext2D
          • Add path APIs(rects, begin/close Path, moveTo, lineTo, arc/arcTo, quadratic/bezierCurveTo, fill/stroke/clip) to QSGContext2D
          • Add additional path APIs(ellipse, roundedrect, text path etc) to QSGContext2D
          • Add filter APIs(mirror, grayscale, threshold, mono, blur, invert, brightness, opaque, convolute, etc) to QSGContext2D
          • Add text APIs(font, strokeText, fillText, text measurement, text align/baseline) to QSGContext2D
          • Add drawimage APIs to QSGContext2D
          • Add pixel operation APIs (create/get/put image data, fast pixel access by V8 indexed array getter/setter) to QSGContext2D
        • Expose context2d APIs to V8 engine
        • Add QSGContext2DCommandBuffer for painting command streaming
      • Documentations
      • Demos&Examples
      • Tests
        • Unit tests
        • Test on device
        • Performance tuning on device

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            charles Charles Yin (closed Nokia identity) (Inactive)
            minshin Minjung Shin (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes