API Review RT:17407 Canvas Node

Tom Schindl tom.schindl at bestsolution.at
Wed Apr 25 00:49:27 PDT 2012


[...]

>> a) Shouldn't you use Rectangle?
> 
> The Node?  We don't want to involve Node objects in the rendering
> interface (though we use some of the same simple enums/objects they use
> for their attributes).
> 

No I refering to the method name. Currently you are using
draw/strokeRect and I'd suggest to use draw/strokeRectangle.


>> b) I would vote for drawRectangle which BTW is nothing more than
>>     calling drawRoundRectangle with 0 as the arcs right?
> 
> Arguably yes, but it's such a simple addition and reads more directly
> than having to look at the arguments and see if there are two 0's in
> there, so I think we'll keep the distinction.  Note that the Rectangle
> node has optionally rounded corners, but they are separate properties so
> they don't appear every time you interact with it and force you to type
> ", 0, 0" to ignore them...
> 

This comment was meant to highlight that you are using draw and stroke
and you should settle on one of them so
strokeRoundRectangle/strokeRectangle or drawRoundRectangle/drawRectangle.

Tom


-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                 geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1   A-6020 innsbruck     fax      ++43 512 935833
http://www.BestSolution.at                      phone    ++43 512 935834


More information about the openjfx-dev mailing list