[Sc-devel] SCUserView, knob, quarks
blackrain
blackrain.sc at gmail.com
Sun Feb 3 00:27:56 PST 2008
Hi James, Jan and all.
Thanks for looking at this James but I am confused now.
Should this be fixed? or stick (for now) to the absolute model?
I will tweak the code in my Quarks objects based on what you guys decide.
Mean time, James, please feel free to make any mods you may see needed.
just do a check out first, I made some changes like 2 or so days ago.
Jan, a tool to test SCUserView based objects would be of great help
for everyone.
greets,
x
On Feb 2, 2008 5:44 PM, Jan Trutzschler <sc3 at sampleandhold.org> wrote:
> i would say, we stick to the absolute origin for now as a default.
> (perhaps i should change that part in the chapter, too)
>
> On Feb 3, 2008, at 12:34 AM, James Harkins wrote:
>
> > I realize people are busy getting the next RC ready, but if you're
> > the author of any of the files listed below, consider...
> >
> > Since EZKnob was reported to me as a class that didn't work with
> > the relative origin composite views, I took a look today to see
> > what would be involved in fixing it. It wasn't too hard -- the
> > attached patch takes care of it, I think (blackrain, okay to commit?).
> >
> > The main problem was that Knob uses (J)SCUserView, but it assumed
> > absolute bounds always. If you put it into a composite view with
> > relative origin, the knob would draw in the wrong place. I
> > addressed this by setting the knob to draw its pen graphics using a
> > relative origin, keeping a variable penBounds whose origin is 0, 0.
> > Mouse tracking always uses absolute coordinates, though, so I
> > needed a second variable trackBounds that would convert relative
> > input bounds to absolute coordinates (if the parent is using a
> > relative origin).
>
> The relative mouse position can be accessed through
> SCUserView:mousePosition .
>
>
> >
> > Now, I really don't have time to look through all of these classes,
> > but there is the concern in the back of my mind that we're going to
> > bundle all the quarks with the sc book, and quite likely many of
> > these classes will break once users discover that (in cocoa) they
> > can set composite view coordinates to be relative. That makes me
> > nervous, when it comes to code that's going to sit on academic
> > library shelves for many years to come.
>
> I could have a look next week to write a little tool, which would
> check whether arbitrary custom SCUserViews would work under various
> circumstances.
>
> Jan
>
> >
> > Okay, said my piece... do with it what you will.
> > hjh
> >
> > <knob-patch.txt>
> >
> >
> >
> > ./GD_ToolboxWindow/GD_ToolboxWindow.sc
> > ./ixi/ixi classes/Bang.sc
> > ./ixi/ixi classes/BoxGrid.sc
> > ./ixi/ixi classes/Grid.sc
> > ./ixi/ixi classes/MIDIKeyboard.sc
> > ./ixi/ixi classes/XiiVuView.sc
> > ./ixi/ixi classes/XixiPainter.sc
> > ./ixiViews/classes/BoxGrid.sc
> > ./ixiViews/classes/Grid.sc
> > ./ixiViews/classes/MIDIKeyboard.sc
> > ./ixiViews/classes/ParaSpace.sc
> > ./Knob/Knob.sc
> > ./lfsaw.de/help/wordBins.html
> > ./MathLib/classes/gui/ScatterView.sc
> > ./NetLib/applications/localDrawing.rtf
> > ./NetLib/applications/Participation.test.rtf
> > ./NetLib/applications/remoteDrawing.rtf
> > ./ProteinBioSynthesis/help/eternal_return.rtf
> > ./redUniverse/classes/RedJWindow.sc
> > ./redUniverse/classes/RedWindow.sc
> > ./seto/SETO_GUIObj.sc
> > ./TriggerView/TriggerView.sc
> > ./tuio/TUIO_GUIObj.sc
> > ./VuView/VuView.sc
> >
> >
> > : H. James Harkins
> > : jamshark70 at dewdrop-world.net
> > : http://www.dewdrop-world.net
> > .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
> >
> > "Come said the Muse,
> > Sing me a song no poet has yet chanted,
> > Sing me the universal." -- Whitman
> >
> > _______________________________________________
> > Sc-devel mailing list
> > Sc-devel at create.ucsb.edu
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>
> _______________________________________________
> Sc-devel mailing list
> Sc-devel at create.ucsb.edu
> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>
More information about the Sc-devel
mailing list