Is view.line_stipple= broken?


#1

Here’s my test code and result. Am I doing it right?

class StippleToolTest

  def getExtents
    Sketchup.active_model.bounds
  end

  def resume(view)
    view.invalidate
  end

  def draw(view)

    stipple_patterns = ["", ".", "-", "_", "-.-", ""]
    len = 100

    stipple_patterns.each_with_index do |s, i|
      pt1 = [i*10+10, 10]
      pt2 = [i*10+10, 10+len]
      view.line_stipple = s
      view.draw_line(pt1, pt2)
    end
    view.invalidate
  end
end

Sketchup.active_model.select_tool(StippleToolTest.new)


#2

@jim_foltz maybe it’s broken on windose, I get full enchilada on mac…


looking at the code, t’s what I expect to see…
john


#3

Thanks, John. I ended up having to disable Use Hardware Acceleration, then it worked.