[SOLVED]BorderImage misunderstanding
-
Hello all,
I'm trying to understand BorderImage but still have no success. Maybe you will help me?
I've read documentation and concluded that border property is used to offset part of image to be scaled but practice showed me another behaviour. I'll explain my understanding with an example. Point me when I go wrong way, please.
Let's start:
I have an image(33 pixels) when each colour rectangle is (11 pixels). Image: !http://img88.imageshack.us/img88/9276/29486181.png(1)!
Then I create BorderImage:@BorderImage {
source: "pictures/test.png"
width: 100
height: 100
border.left: 1;
}@
And I expected the purple rectangle will be stretched and all other parts' sizes won't change. But instead I have the purple rectangle cropped and other parts stretched:!http://img203.imageshack.us/img203/469/91208145.png(2)!
Thus, my understanding is: the border property allow to crop a part of the image and not cropped part will be stretched. But it is totally different from the examples in Qt documentation. Please, help me to understand where I'm wrong.P.S. This forum will kill me someday. I didn't manage to wrap my code by those buttons and two @ symbols. Is there a way to use a normal markup like BB codes?
-
Pink part should be streched only vertically (region 4), other parts should be streched hor. and vertically (they are in region 5, see documentation).
I don't why pink part is not fully streched vertically.
-
"Regions 4 and 6 are scaled according to verticalTileMode". That's what is said in "documentation":http://doc.qt.nokia.com/4.7-snapshot/qml-borderimage.html
-
OMG I've got it! Thank you guys! Obviously, it is a good practice to read what is written in documentation carefully instead of imagine own behaviour model as I did :)
[quote]I don’t why pink part is not fully streched vertically.[/quote]
It actually did. You may see a pink line at the left side.