Xojo canvas4/27/2023 ![]() ![]() He has been hobby programming on computer s for over 25 years. He has created over 185 technical and industrial simulation programs. Eugene can be contacted via: Website: Dedication Alain Bailleul is a contributor to this book and would like to thank his parents Gilbert and Irene. At a very young age, they gave him his first computer and stimulated him to push his boundaries ever since. Website: Eugene dedicates this book to his patient family. Without their support this would not have been written. Assumptions To be able to use the code in this book, you need a version of Xojo. These test programs were created and tested on Windows 8.1 and Maverick. XOJO GOOGLE MAPS PROĬode for this book was written in my licensed version of Xojo Pro R2. ![]() Notice This information is intended for Xojo programmers to learn how to reasonably use the Canvas control. This is not intended to be a complete reference for Xojo or the Canvas control. ![]() 3ģ Table of Contents Chapter 1 - Introduction to the Canvas What a Canvas IS and IS NOT Raster vs Vector Drawing Canvas Fundamentals Drawing a Line Constructors and Destructors Buffers Explained Single Buffer Double-Buffer Blanking Interval Fundamental Shapes Fill Shapes with Colour Colouring in Hexadecimal Pens Pixel Convert Colour Values Graphics Object Performance Chapter 2 - Files Loading a Graphics Picture Drag and Drop Picture File Open Xojo Picture Saving A Picture Backdrop Saving File Formats Saving Canvas Graphics Layer Setup Picture Graphics (VERY IMPORTANT Double Buffer) Saving Picture and Graphics Layer Chapter 3 Text Draw String Rotating Text Wrap Text Print Text Scroll Bar Zooming Text (Picture) Horizontal Centred Text Zooming Text (Font Size) Chapter 4 Use the MouseĤ Freehand Drawing with the Mouse Move Picture with Mouse Mouse Zoom Chapter 5 Canvas Class Begin a Canvas Class Things that Happen when using a Class Making an Event Chapter 6 Charts Line Chart (Introduction) Line Chart (Intermediate) Line Chart (Customize) Bar Chart Pie Chart Chapter 7 Objects First Object Program Getting Ready to use the Object Mouse Moving the Objects Make a Simple Game Multiple Object Types (Object 2D) Chapter 8 Graphics Picture Resizing Crop a Picture (Pixel) Rotate a Picture Flipping Horizontal and/or Vertical-Pixel Slower Flipping Horizontal and/or Vertical- Row/Column Fast Blur (RGBSurface IMPORTANT) Sharpening Filter Emboss Filter Edge Detection Picture with Mirror Image (Vertical) Posterization Pixelation Grey Scale Merging Two Images Gaussian Blur Gaussian Sharpening Crop a Picture (DrawPicture) Chapter 9 - Masks and Alpha Channel Implementing a Maskĥ GreyScale Mask Timer Fade Alpha Channel Chapter 10 Building Controls Canvas Button Simple Canvas Button Detail Canvas Switch Chapter 11 Animation Creating Static Template Moving the Picture with Keyboard Keys Boundary Bounce Sprite Sheet Animation Creating/Destroying an Object Open Event Create Objects with PushButton Delete Object with PushButton Drag and Drop Deletion Chapter 12 Games Puzzle Open Event Pressing Pushbutton MouseDown SpaceShip Shooter Trigonometry Ship Setup Basics (12-2a) Ship Movement Basics Setting Up Frameworks (12-2b) Event Handling (12-2c) Adding a Ship (12-2d) Ship Shooting (12-2e) Building Asteroids (12-2F) Collision (Final 12-2g) IndexĦ Pixel A Canvas is made of many individual dots or pixels, and when a canvas has a width of 200 by 200, that means that there are 200 pixels in the X direction, and 200 pixels in the Y direction. Because Canvas pixels are zero-based, this means that the first of 200 pixels starts at zero (0), and the 200 th pixel ends at 199. The pixel method in the graphics layer of the canvas can get or set the colour of the pixel.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |