Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

drawQuad()

Purpose

Draw an image or portion of an image on an area of the screen

Description

Draw the spcified part of an image to the specified part of the screen and with the specified tint

Syntax

drawQuad( handle, { sourcex, sourcey, sourcew, sourceh }, points, tint )

Arguments

handle Variable which stores the desired image file

sourcex Horizontal pixel coordinate in the source image from which to begin drawing

sourcey Vertical pixel coordinate in the source image from which to begin drawing

sourcew Width (in pixels) of the source image to draw

sourceh Height (in pixels) of the source image to draw

points Array of points of the target area of the screen (top left, top right, bottom right, bottom left)

tint colour name or RGB values { red, green, blue, opacity } between 0 and 1

Example

// draw image in centre with 100 pixel border and green tint
image = loadImage( "Ansimuz/CyberpunkStreetLayer2", false )
size = imageSize( image )
points = []
points[0] = { 100, 100 }
points[1] = { gWidth() - 100, 100 }
points[2] = { gWidth() - 100, gHeight() - 100 }
points[3] = { 100, gheight() - 100 }
drawQuad( image, { 0, 0, size.x, size.y }, points, green )
update()
sleep( 3 )

Associated Commands

clear(), createImage(), drawImage(), drawImageEx(), drawSheet(), loadImage(), update(), uploadImage()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.