![]() An image actually on a Confluence page is stored as a database blob, so right-clicking it and grabbing the link copies a url starting with blob:, which won't display in this gadget.īTW, you might ask why I'm doing this on a Jira Dashboard vs. It shrinks a large image down to the width of the surrounding gadget when you're viewing it in editing, but as soon as you click Save, it bounces back to full size, and you need to use scrollbars to see the whole thing.Īm I missing something, or is this gadget just buggy?Īlso, if this helps anyone else-the only way I have found for using images stored on Confluence is to save that image in a file list, then right click the filename and choose Copy Link Address. Make sure to select JPEG as the format when using Save As. You can also click Save As to create a new file and choose where to save it. This scales the objects as normal to fit the window without modifying the co-ordinates used for the objects but also adds 'padding' to the view to match the window so that the objects stay at the correct aspect ratio.I'm not able to get 100% x 100% working. Once you're satisfied with the new size, you can save the changes to the file. If you are resizing to a different proportion - say 24x36' to 22x28' - well I dont think there is a magic bullet. and change the Page Size to the new size. So, using Mister VistA's example, the values would be:ĭivide the window size by the lowest factor to set the view: Then click on Layout - Liquid Layout - and make sure Liquid Page Rule is set to Scale. Work out the scale factors in the same way (using the ratio of object size to the window size) and then apply them to the view. Instead of scaling your board to match the new view size (which is the new window size), you could consider keeping the board co-ordinates the same by manipulating the view instead i.e. However, just for options, there is another choice (although it's very similar): Mister VistA, above, posted the answer I would probably use. This is a form of letter-boxing, which I pointed you in the direction of that code. You'll also need to use the same scaling factor for your chess piece size and positions as well. Personally, I would try to implement the second option. Just two quick and easy ways that I can think of to tackle this problem. That will result in a game board that is 200x200 I instead of 200x400.Īlso, you'll probably want to take downsizing into consideration, in which case, I believe you'll want the lowest absolute scaling factor (as in absolute values). You can resize an object freely, to modify its proportions any way you like, or proportionally, to make it larger or smaller without changing its essential shape. What you want to do is only use the lowest value (2) for both x and y scaling operations. For instance, if your board is 100x100 pixels, and your window is 100x100, then resizing your window to 200x400 will give you a scaling factor of 2 and 4 (respectively for x and y). This will keep a 1:1 aspect ratio and allow your board to grow without overshooting either the x or y axis. Obtain your scaling factor and then use the smallest factor for both dimensions. Of course, this isn't a downsize friendly option.Ģ. This would essentially allow more of the background to be displayed when the window size increases, while keeping the board the same size. Keep the game board the original size and have a scaled background. There are two ways that I would try to accomplish this:ġ. Void updateScreen (sf :: RenderWindow &gameWindow, sf :: Sprite chessBoard ) ![]() resizeBoard (scaleXFactor, scaleYFactor ) Void resizeObjects (sf :: RenderWindow &gameWindow, Board chessBoard, sf :: Event event )įloat scaleXFactor = event. ResizeObjects (gameWindow, chessBoard, event ) type = sf :: Event :: Closed )Įlse if (event. Void checkInput (sf :: RenderWindow &gameWindow, Board chessBoard ) ![]() ![]() Sf :: RenderWindow gameWindow (sf :: VideoMode ( 700, 703, 24 ), "Chess" ) Void updateScreen (sf :: RenderWindow &, sf :: Sprite ) Void resizeObjects (sf :: RenderWindow &, Board chessBoard, sf :: Event ) Void checkInput (sf :: RenderWindow &, Board chessBoard ) ![]()
0 Comments
Leave a Reply. |