Changeset 42

Show
Ignore:
Timestamp:
06/07/06 09:19:50 (2 years ago)
Author:
al
Message:

Added labels and debug demo, made SweetCanvas? respect shouldFill

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plotkit/trunk/PlotKit/SweetCanvas.js

    r37 r42  
    116116        } 
    117117 
    118         context.fillStyle = chooseColor(bar.name).toRGBString(); 
    119         context.fillRect(x, y, w, h); 
     118        if (this.options.shouldFill) { 
     119            context.fillStyle = chooseColor(bar.name).toRGBString(); 
     120            context.fillRect(x, y, w, h); 
     121        } 
    120122 
    121123        context.shadowBlur = 0; 
     
    174176            } 
    175177            context.translate(-1, -2); 
    176             bind(makePath, this)(context);         
    177             context.fill(); 
     178            bind(makePath, this)(context); 
     179            if (this.options.shouldFill) { 
     180                context.fill(); 
     181            } 
    178182            context.restore(); 
    179183        } 
     
    251255 
    252256        if (Math.abs(slices[i].startAngle - slices[i].endAngle) > 0.0001) { 
    253             makePath(); 
    254             context.fill(); 
     257            if (this.options.shouldFill) { 
     258                makePath(); 
     259                context.fill(); 
     260            } 
    255261            makePath(); 
    256262            context.stroke(); 
  • plotkit/trunk/doc/PlotKit.html

    r41 r42  
    139139      <a href="http://media.liquidx.net/js/plotkit-tests/dynamic.html">Dynamic Charting</a>. 
    140140 </li> 
     141 
     142 <li> 
     143      <a href="http://media.liquidx.net/js/plotkit-tests/labels.html">Labels Example</a>. Thanks to Christopher Armstrong. 
     144 </li> 
    141145</ul> 
    142146 
    143147<h1> Version History</h1> 
     148<ul> 
     149 <li> 
     150     Make Sweet{Canvas/SVG}Renderers respect shouldFill. 
     151 </li> 
     152</ul> 
    144153 
    145154<h3>PlotKit 0.8</h3> 
  • plotkit/trunk/doc/PlotKit.txt

    r41 r42  
    6868* Unit Tests [Canvas][CanvasTest], [SVG][SVGTest], [SweetCanvas][SCanvasTest], [SweetSVG][SSVGTest]. 
    6969* [Dynamic Charting][DynamicTest]. 
     70* [Labels Example][]. Thanks to Christopher Armstrong. 
    7071 
    7172Version History 
    7273=============== 
     74 
     75* Make Sweet{Canvas/SVG}Renderers respect shouldFill. 
    7376 
    7477###PlotKit 0.8 
     
    121124[QuickstartEasyDemo]: http://media.liquidx.net/js/plotkit-tests/quickstart-easy.html 
    122125[DynamicTest]: http://media.liquidx.net/js/plotkit-tests/dynamic.html 
     126[Labels Example]: http://media.liquidx.net/js/plotkit-tests/labels.html 
    123127 
    124128{% endfilter %}