Log in

View Full Version : Question about the 9 slices youtube video



Amatiste
July 29th, 2020, 00:03
Damned,

Do the slicing of the sample images depend on size of image? Like you are slicing x part of the image based on the pixels you are choosing to use and place? Like the Cybergirl image 38138 (this is a snip from video, so doesnt match the file size), this code is telling the program to select those pixels and place them there? bottomright=580,0,611,670

thanks again, Amatiste

damned
July 29th, 2020, 01:31
bottomright is the slice that fills the bottom right corner of the screen
it doesnt tile in any drection - it is a fixed size
in this case i have defined bottom right of my screen to use the image starting from 580px across to 580+611px and from 0px down to 0+670px.
when you are not using all 9 slices there are some combinations that wont work
for that particular image i want the cybergirl character to appear once only on the screen and the best place for that is in the bottom right because of how that image is laid out

I could have flipped that image, added some whitespace on the left and made the selection wider (to include the extra width from the white space) and used the bottomleft slice to display the image

It needs to use one of the corner slots as they are the only ones that do not tile

this image wouldnt work in one of the top corners because the bottom edge of the actual graphic is a straight edge thru the content

Most images do not work as backgrounds because of tiling. But you can make a lot of images work with some creative thinking and some basic edits of the image.