I was trying to rotate a group(rectangle) on the bottom right coordinates using flex..
See the image
how to achieve this rotation ?
Have you tried setting originX and originY of the effect to the width and height of the component you're rotating?
Here is a link to a tutorial that shows how to do it:
http://www.flashandmath.com/howtos/rotation/
Related
I have the following problem:
I`m using with angular 2 the polymer library, more precise paper-slider.
I had to put my slider from css from horizontal position to vertical. The problem is that now if I keep a click on the slider and I move the mouse left-right the slider moves up-down, how can I change the axes of the slider in order to use my slider in vertical position.
Kind Regards,
A developer in need :)
maybe you can use the s-slider element, there you can set vertical property
https://github.com/StartPolymer/s-slider
iOS can use layer.cornerRadius to make a round UIButton.
Does WKInterfaceButton have this property?
If not, how can I make a round WKInterfaceButton in WatchKit.
If you put an image inside a group, you can then set the radius of the group. This crops the image into a circle. In the picture below, I have:
Group (radius 56)
Group (radius 52)
Image (a square image)
While this example is with an image, you can use the same technique for a button. Previously the dog was clickable as a button so this is doable.
WKInterfaceButton does not have a corner radius property. You can make a circular button by setting a circular image as the button's background image. You can generate the image in code doing something like this: Draw a simple circle uiimage
You don't need an image to make WKInterfaceButton rounded. Instead:
Go to Attributes inspector for the button, and select content type: Group
Inside the button find the group and set its corner radius to whatever you need.
Scroll down the inspector and set both fixed Width and Height to the value equal to the radius doubled. Here you go
You can put whatever you want inside the button, for example a text label. This way you also can make oval buttons.
I want to draw something like x\y axes scales like rules in Photoshop but with QScrollArea
There is good property for that:
QAbstractScrollArea::setViewportMargins(20,20,0,0)
and it works fine - there white space at the top and left sides and putting point to (0,0) draw it with specified offset.
But I cant draw at this place.
I tried
painter.drawLine(-10,0,-10,height())
but it do nothing. So how can I draw something on this margin space?
You're painting on the viewport, and this won't work. You need to put a widget in the margin area and paint within that widget's paintEvent.
im trying to resize image on hover....but we can only specify static length values and no % values in transform:scale of css3 i guess. Example:
#imgp:hover{-webkit-transform: scale(7,6);transform: scale(7,6);}
but using above the wide images are showing with equal dimensions ie. square.
how to show with original ratio ? is it possible ?
perhaps you're trying it for a square image, scaling in only one dimension will solve the problem:
See Fiddle by #drip.
[http://jsfiddle.net/83BgY/]
I'm making a flex 3.5a/air2 application and I've made a popup window but I can't seem to get its bottom corners rounded. Setting cornerRadius seems to only affect the top corners.
There doesn't seem to be a roundedBottomCorners property like there is for panels, and adding a controlbar with a cornerRadius also has no effect.
I'm sure this is a very simple problem but would really appreciate any help as I can't find the answer on google or after searching on here!
If you can give up window header (and paint it yourself), try to make transparent window (with transparent background) and construct it from controls you need. I'm sure you can get window of any shape this way.
Ended up making the window transparent and setting showFlexChrome to false. Then using a container I was able to get rounded corners.
It didn't help my other problem which was trying to get a glow effect around the window and still being able to resize it.. for that I had to override the mouseDownHandler from the window class so I could modify the drag locations to the container canvas. What a pain!