         ctx.arc(@sx[i], @sy[i], @outer_radius[i], 0, 2*Math.PI*2, true)
         ctx.stroke()
 
-  _full_path: (ctx) ->
+  _full_path: (ctx, glyph_props, use_selection) ->
+    #duped
+    if not glyph_props
+      glyph_props = @glyph_props
     for i in [0..@sx.length-1]
       if isNaN(@sx[i] + @sy[i] + @inner_radius[i] + @outer_radius[i])
         continue
-
+      #duped
+      if use_selection == 'selected' and not @selected_mask[i]
+        continue
+      if use_selection == 'unselected' and @selected_mask[i]
+        continue
       ctx.beginPath()
       ctx.arc(@sx[i], @sy[i], @inner_radius[i], 0, 2*Math.PI*2, false)
       ctx.moveTo(@sx[i]+@outer_radius[i], @sy[i])
       ctx.arc(@sx[i], @sy[i], @outer_radius[i], 0, 2*Math.PI*2, true)
 
       if @do_fill
-        @glyph_props.fill_properties.set(ctx, @data[i])
+        glyph_props.fill_properties.set(ctx, @data[i])
         ctx.fill()
 
       if @do_stroke
-        @glyph_props.line_properties.set(ctx, @data[i])
+        glyph_props.line_properties.set(ctx, @data[i])
         ctx.stroke()
 
   draw_legend: (ctx, x1, x2, y1, y2) ->

class AnnulusView extends GlyphView

  initialize: (options) ->
    glyphspec = @mget('glyphspec')
    @glyph_props = new glyph_properties(
      @,
      glyphspec,
      ['x', 'y', 'inner_radius', 'outer_radius'],

        new line_properties(@, glyphspec)
      ]
    )
    return glyph_props


  _set_data: (@data) ->
    @x = @glyph_props.v_select('x', data)
    @y = @glyph_props.v_select('y', data)
    #duped
    @selected_mask = new Array(data.length-1)
    for i in [0..@selected_mask.length-1]
      @selected_mask[i] = false

  _render: () ->
    [@sx, @sy] = @plot_view.map_to_screen(@x, @glyph_props.x.units, @y, @glyph_props.y.units)
