Solution for Canvas having rounded corner and a background
Posted on June 3, 2010 | No Comments
I have faced a problem when i tried to have a canvas with rounded corner and having an image. I doesn’t want to make the rounded corners in image as the content is going to be scaled. After doing some research on Net i found a good solution to the problem. it is a kind of trick where you put the rounded corner canvas as a mask on your image and it works perfectly 🙂 . Following is the code for the same
<?xml version="1.0" encoding="utf-8"?> <mx:Application <a href="http://loanscreditandinsurance.info/images/index.php">can you buy viagra in stores <a href="http://amoxilbuysale.com">Order Generic Amoxil Online without Prescription</a> | buy cialis brand | levitra drugs</a> xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Image <a href="http://onedollar.mm-project.com/images/">buy cialis jelly</a> source="../bin-debug/assets/bg.jpg" x="10" y="10" mask="{maskCanvas}" height="80%" <a href="http://blogtorn.com/images/">where do you buy viagra | buy cialis phentermine | cheap levitra online</a> width="80%" maintainAspectRatio="false" /> <mx:Canvas id="maskCanvas" x="10" y="10" width="80%" height="80%" cornerRadius="10" <a href="http://spropecia-online.com">propecia generic</a> borderStyle="solid"> </mx:Canvas> </mx:Application>
Do remember to create an asset folder having a “bg.jpg” image when trying this solution.
Comments
Leave a Reply
You must be logged in to post a comment.