1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

photobot.Canvas.preferences()

Syntax

canvas.preferences(interpolation=BILINEAR)

Description

Sets a number of preferences that influences how layers are processed on this canvas. Currently, only defines the image interpolation, which can be set to NEAREST, BICUBIC or BILINEAR. Image interpolation controls how pixels are manipulated when rotating and scaling layers for example: with NEAREST being a fast but lossy interpolation, and BILINEAR being a more accurate yet slower interpolation. Image interpolation is set to BILINEAR (best) by default.

Syntax

photobot = ximport("photobot")
canvas = photobot.canvas(200,200)
canvas.preferences(interpolation=NEAREST)
canvas.layer("robot.jpg")
canvas.layers[1].rotate(30)