Home › Forums › General › Programming › LookAndFeel()
- This topic has 48 replies, 3 voices, and was last updated 8 years, 5 months ago by zeoka.
-
AuthorPosts
-
April 7, 2015 at 11:02 am #43193
I’m looking into this right now. There are two rectangle classes now Rectangle that is a
based class and a RectangleFloat class that is a based class. But lua is not clever enough to cast between those types. So special methods need to exist. I’m adding a toInt() method to the Rectangle class right now.
April 7, 2015 at 3:29 pm #43214Thanks Atom
Anyway this is not an issue :
jj = Path()
jj:addRectangle((width * 0.5)-(width*0.04),(width * 0.5) – (width*0.13)-( (width-(width*0.16) )- (width * 0.5)) ,width*0.08,width*0.13)
kk = jj:getBoundsTransformed(AffineTransform( AffineTransform .rotation (angle,(width * 0.5),(width * 0.5))))
g:excludeClipRegion(Rectangle(kk:getX(),kk:getY(),kk:getWidth(),kk:getHeight()))
I got it like that
toType() or getSmallestIntegerContainer ( ) would be ok tooThe problem is all codes from paths don’t get the transformed points but “the smaller rectangle in the path” so i can’t do nothing from this rectangle
Currently a Juce excludeClipRegionFromPath() could be nice for that
I Wonder if there is other possibilities….Attachments:
You must be logged in to view attached files.April 8, 2015 at 2:17 pm #43309hi
I’ve an error at start up in “called when the panel has finished loading”
Ctrlr give me an error message : h is a nil value and the timer fail
but the look and feel is applied anyway
if I do h:getPropertyString(“uiType”) then look and feel is not applied.I don’t see what happens
lf = LookAndFeel() lf:setImplementation (lookAndFeelImpl) for m = 0,183 do h = panel:getModulatorWithProperty("vstIndex",m):getComponent() e = h:getProperty("uiType") if e == "uiSlider" then h:setCustomLookAndFeel(lf) end end timer:setCallback (1,RestMidCallback) timer:startTimer(1,1000)
April 8, 2015 at 2:22 pm #43312You might be going out of bounds, are you sure it’s 0 to 183 inclusive, maybe you overshot the numbering ?
April 8, 2015 at 2:43 pm #43316Oh that’s this ! thank you
Tried before but with propertyString instead of property…
April 9, 2015 at 2:30 pm #43398Any chances to draw a circle truncated by a simple rectangle in a path ?
knb_p1= Path() knb_p1:startNewSubPath(DEMI-(width*0.02),DEMI- (width*0.13)-((width-(width*0.235))- DEMI)) knb_p1:lineTo( DEMI-(width*0.02),DEMI-((width-(width*0.235))- DEMI) ) knb_p1:lineTo( DEMI+(width*0.02),DEMI-((width-(width*0.235))- DEMI) ) knb_p1:lineTo( DEMI+(width*0.02),DEMI- (width*0.13)-((width-(width*0.235))- DEMI)) --knb_p1:adddArc (width*0.1,width*0.1,width- (width*0.2) ,width - (width*0.2),6.4,6.1 ,false) knb_p1:closeSubPath ()
not sure I can do a biiigg arc and must find the correct angle that “glue” my points
I read at about big arc in juce class and tried but really understand what I do
If the start point of arc doesn’t math my last point is the path working ?
I tried to turn all the graphics that is performed and corrected the after objects that turning*2 also !! but my lights effects turn too so it’s dead by this way
Edit:
SOLVEDNovember 10, 2015 at 6:07 pm #62601Hi
i need to aplly l&f to fixed sliders
Please Atom can you implement them or may be not possible ?
my panel sleeps since i can’t get thatit was hard to design the vp9000 knob. i’ve exaggerated the 3d effect but i’m not happy with the tick yet but it’s another story…..
Attachments:
You must be logged in to view attached files.November 10, 2015 at 6:24 pm #62604What’s the problem here ? you should be able to apply the LF to anything ? It’s not working ? it’s crashing ?
November 10, 2015 at 7:52 pm #62608the l&f is simply not applied to them. on the panel the l&f is applied to canvas
i think may be this is because they are not in the l&f implementation , i see slider ,combo , ect … nothing specific however not sure it needs
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.