On 10/17/14, 1:31 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote:
> >Specifying percentages or LTRB does not the solve the problem of >maintaining the stroke thickness while scaling. When buttons scale, we >want the stroke widths to remain same. That is where 9-slice helps. If >not, you will have to specify a stroke width for every scale. > > >Take scroll thumb for an example. It is a button that one can click and >move. At the same time, its height (or width, depending on scrollbar >direction) should adjust according to the amount of content that is being >scrolled. It's skin must have a 9-slice grid defined so that it looks >good >at any size. > >Thanks, >Om Maybe I’ve forgotten how computer graphics work, or I am not being clear enough. In MXML, if you specify: <Rect left=“0” right=“0” top=“0” bottom=“0”> <stroke> <SolidColorLine thickness=“2” /> <stroke> </Rect> then regardless of the size it is drawn, there will be a two-pixel line around the rectangle, which is what I think you want (assuming you size it and don’t scale it). A scroll thumb would have other logic to center any “grip” graphics. That’s because under the covers, the code will call drawRect(0, 0, width, height), which I think is what you want. I would expect SVG to be able to do something similar. -Alex