Changeset 174

Show
Ignore:
Timestamp:
10/01/07 14:05:46 (15 months ago)
Author:
fdb
Message:

Colors updates for the latest version: _canvas and utility library.

Location:
libraries/colors
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • libraries/colors/__init__.py

    r173 r174  
    77from copy import deepcopy 
    88from nodebox.graphics import Color as _Color 
    9 from nodebox.graphics import Grob, RGB, HSB, CMYK, CORNER, random, choice, files 
     9from nodebox.graphics import Grob, RGB, HSB, CMYK, CORNER 
     10from nodebox.util import random, choice, files 
    1011from nodebox.graphics.cocoa import _restore, _save 
    1112from AppKit import NSShadow, NSColor 
     
    26792680        (x, y), (w, h) = path.bounds 
    26802681        if x+w > 0 and y+h > 0 and x < _ctx.WIDTH and y < _ctx.HEIGHT: 
    2681             _ctx._canvas.append(self) 
     2682            _ctx.canvas.append(self) 
    26822683 
    26832684        if _shadow:  
  • libraries/colors/colors_example1.py

    r136 r174  
    1 colors = ximport("colors") 
     1try: 
     2    colors = ximport("colors") 
     3except ImportError: 
     4    colors = ximport("__init__") 
    25 
    36# Deep green gradient background. 
  • libraries/colors/colors_example2.py

    r136 r174  
    1 colors = ximport("colors") 
     1try: 
     2    colors = ximport("colors") 
     3except ImportError: 
     4    colors = ximport("__init__") 
    25 
    36# Aggregates are collections of colorranges (e.g. warm, dark) 
  • libraries/colors/colors_example3.py

    r145 r174  
    1 colors = ximport("colors") 
     1try: 
     2    colors = ximport("colors") 
     3except ImportError: 
     4    colors = ximport("__init__") 
    25 
    36size(600, 600)