Re: [Fxruby-users] FXGLLine in glviewer
Status: Inactive
Brought to you by:
lyle
|
From: Joel V. <vj...@PA...> - 2003-06-08 16:09:51
|
Lyle Johnson wrote:
> Joel VanderWerf wrote:
>
>> I ran into this problem too, and never understood it. So I always
>> append other shapes (such as a very narrow rectangle, instead of a line).
>
>
> Sounds like a bug to me, Peter and Joel.
>
> I can't check it out right this minute, but I think I see the problem. I
> don't think we ever call the base class version of initialize for
> FXGLLine. See what happens if you modify lib/fox/glshapes.rb and add
> this as the first line of FXGLLine's initialize method:
>
> super()
>
> At any rate, I've added this to the bug list and will investigate for
> myself as soon as possible.
That almost does it. You also need to define #bounds like this:
def bounds
FXRange.new([@fm.pos[0], @to.pos[0]].min,
[@fm.pos[0], @to.pos[0]].max,
[@fm.pos[1], @to.pos[1]].min,
[@fm.pos[1], @to.pos[1]].max,
[@fm.pos[2], @to.pos[2]].min,
[@fm.pos[2], @to.pos[2]].max)
end
|