Graphics support in Opera Presto 2.7

Animation

OpenGL

Opera supports the OpenGL 2D/3D graphics API; see OpenGL API

Direct3D

Opera supports the Direct3D device driver interface (DDI); see Direct3D

<canvas> element

Opera supports the <canvas> element specification, including canvas shadows, which is currently a work in progress.

Scalable Vector Graphics (SVG)

► Events

There is support for listening to any event in the svg module. Some events are not sent by core, for example: activate.

  • SVG 1.1 doesn't specify a key-event set, and thus the attributes onkeyup, onkeydown and onkeypress don't register a corresponding event listener for those events.
  • In Opera it's possible to install listeners for key-events with DOM, for example: element.addEventListener('keydown', keyhandler-function, false).
  • If key-events are used it's vital to use evt.preventDefault() to prevent any key-event that should be handled only by the script from escaping upwards to the UI which may be listening for shortcut keys.

► FPS

  • FPS (Frames Per Second) support: Opera enables you to manipulate the speed (frames per second) of your SVG animations using JavaScript by supporting the SVGElement.currentFps and SVGElement.targetFps properties. These properties respectively read and control SVG frames per second; see this Opera reference.

► Integration

Opera supports the following SVG inclusion types.

  • In HTML: <object> element
  • In HTML: <iframe> element
  • In HTML: <embed> element
  • In HTML: <img> element
  • In CSS: background-image property
  • In CSS: list-style-image property

► Interoperability

Some content may fail to render if sent with the wrong MIME-type, or if the namespace declarations are missing.

  • The correct MIME-type for svg is image/svg+xml.
  • The namespaces to open are svg: http://www.w3.org/2000/svg and xlink: http://www.w3.org/1999/xlink.
  • For CSS it should be noted that you must specify length values with units. For example:
    • font-size: 12; in CSS will mean the value is invalid, and thus it will be ignored.
    • This applies to all style elements, style attributes and external stylesheets.
    • The CSS content property can also embed SVG.

► Painting

Support has been added for the buffered-rendering property; see section 11.10.5.

► Printing

SVG is output as a bitmap image to the printer.

  • The output is not sent in vector format, thus the clarity of the image may be blurred.

► SVG fonts

  • Font switching: Support has been added in the rendering/rasterizing of glyphs in mobile technologies; see Section 3.4 Types of graphics elements.
  • SVG fonts in HTML support: Use SVG font files to style your text using CSS (in both HTML and SVG files); see this Opera reference.

Raster Graphics

Opera supports:

  • GIF
  • JPEG (partial support):
    • Supported:
      • Baseline
      • Extended
      • Progressive (SOF0, SOF1 and SOF2)
    • Not supported:
      • Lossless
      • Differential (hierarchical)
      • Arithmetic
  • BMP
  • ICO
  • WBMP
  • PNG including alpha channel (degrees of transparency) and gamma support (device independent colors)
  • APNG

Support

Opera Help

Need help? Hit F1 anytime while using Opera to access our online help files, or go here.