Skip to main content

Posts

Showing posts with the label transform

CSS3 transform scale() does pixelate some elements

It's a miracle to me why the scale transform does behave in such a strange way. The two elements shown below in the image have exactly the same html behind, but the scale transform does pixelate some elements... this strange behaviour just appears after a completed drag & drop on the dragged element, and the elements around the dragged element. click to see the Image css is the following: div.KE_coverflowContainer { vertical-align:top; height:122px; width:90px; padding:5px; text-align:center; display:inline-block; margin:10px 5px 5px 0px; background:#e4e4e4; position:relative; cursor:default; -moz-border-radius: 5px; border-radius: 5px; border: 1px solid #bababa; } div.KE_coverflowContainerHover { -moz-transform: scale(2) translate(0px,29px); -o-transform: scale(2) translate(0px,29px); -webkit-transform: scale(2) translate(0px,29px); transform: scale(2) translate(0px,29px); z-index:1000; c

CSS3 transform scale() does pixelate some elements

It's a miracle to me why the scale transform does behave in such a strange way. The two elements shown below in the image have exactly the same html behind, but the scale transform does pixelate some elements... this strange behaviour just appears after a completed drag & drop on the dragged element, and the elements around the dragged element. click to see the Image css is the following: div.KE_coverflowContainer { vertical-align:top; height:122px; width:90px; padding:5px; text-align:center; display:inline-block; margin:10px 5px 5px 0px; background:#e4e4e4; position:relative; cursor:default; -moz-border-radius: 5px; border-radius: 5px; border: 1px solid #bababa; } div.KE_coverflowContainerHover { -moz-transform: scale(2) translate(0px,29px); -o-transform: scale(2) translate(0px,29px); -webkit-transform: scale(2) translate(0px,29px); transform: scale(2) translate(0px,29px); z-index:1000; c

Anti-aliasing lines when using CATransform3DRotate

I copied the code from the answer to How do I apply a perspective transform to a UIView? in order to achieve the following image. Note, however, the jagged lines separating the levels. Is there away to perform this kind of perspective transformation in a way that anti-aliases these jagged lines? Edit I've tried the solutions offered by DarkDust in the comments on this post. None seem to work. Here's my code: levelView = [[UIControl alloc] initWithFrame:CGRectMake(100, 60, 160, 230)]; [self addSubview:levelView]; levelView.transform = CGAffineTransformScale(self.transform, .8, .8); CALayer *layer = levelView.layer; //DarkDust's 2nd comment layer.borderWidth = 1; layer.borderColor = [[UIColor clearColor] CGColor]; CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; rotationAndPerspectiveTransform.m34 = 1.0 / 1000; rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, 45.0f * M_PI /