Sometimes we need to rotate a Picture from portrait to landscape and vice versa. Since the introduction of the Graphics methods Translate and Rotate this is pretty simple to do! Continue reading and I will show you how to create a Method Extension for the Picture class that will be able to do that. This will work on Desktop and iOS projects by only copying and pasting the code, but you will need to make some changes to the example project for the Web version because of the need to convert Picture to WebPicture and back.
Comments closedTag: Graphics
The DrawText method from the Graphics class offers a simple way to left-align text at the given X and Y coordinates, even applying a wrap value to wrap every line of the text block at the provided width value. Wouldn’t it be great to be able to do the same thing while aligning blocks of text to the right and center? Continue reading and I will show you a technique you can use as the starting point which you can fine-tune to your specific needs.
Comments closedWith the added functionality of the Brush property and the ClipToPath, Clip and DrawObject methods, Xojo 2022r1 completes the practical PDFGraphics class support for all the methods and properties that makes sense (or are applicable) from Xojo’s Graphics class.
Comments closedAmong the many improvements added to PDFDocument in Xojo 2021r3 is support for Graphics.Transparency as well as support for the alpha value in the color…
Comments closedAmong the major enhancements made to the images support in PDFDocument
in Xojo 2021r3 release, in addition to transparency support, alpha channel support, and the new way the data is codified in the resulting PDF stream (no more DCTEncoding), we’ve also tackled an issue with images not being as sharp as they should have been.
The popular PDF support and features introduced last year in Xojo 2020r1, have gained several improvements and bug fixes in today’s release. Now, with Xojo 2021r1, Xojo’s PDF support include a set of new Graphics features that will continue to be expanded more in future releases.
Comments closedFirst available on iOS, staring with 2021 Release 1 you can now also use the Rotate, Translate, SaveState and RestoreState methods with Desktop projects.
Comments closedLet’s talk about the new properties and methods added to the Graphics class that will make all your Paint drawings more flexible and powerful! The enhancements include: LineDash, LineCap, LineJoin, the new Brush property with LinearGradientBrush, RadialGradientBrush, ShadowBrush and PictureBrush, and the new PictureBrush class.
Comments closedOn the forum a user asked if there was a way to create a rectangle with only the top left and top right corners being rounded. Xojo’s built-in RoundRectangle control draws with all four corners rounded, so that was not an option.
One solution is to use a GraphicsPath to draw exactly what you want. With a GraphicsPath you can use the AddArc() method to add rounded corners and then draw the lines for the rest of the rectangle.
Comments closedSure you can create a Subclass of any Picture, Canvas or class and write code to center another Picture in its respective Graphics contexts. But taking the class extension approach means that you can reuse the same code for any of these (or any additional class) offering a Graphic context, so you can pass along the Picture you want to center and re-scale (if needed) in its area.
Comments closed