LIKO-12
  • Docs
  • Help
  • Blog

›Peripherals' Objects

Introduction

  • What is LIKO-12
  • How to install LIKO-12
  • Getting started
  • Your first LIKO-12 program

Peripherals

  • Audio
  • BIOS - Basic Integrated Operating System
  • CPU - Central Processing Unit
  • FDD - Floppy Disk Drive
  • Gamepad
  • GPU - Graphics Processing Unit
  • HDD - Hard Disk Drive
  • Keyboard
  • RAM - Random Access Memory
  • TouchControls - The Touch Gamepad Input
  • WEB

Peripherals' Objects

  • GPU / fontData
  • GPU / image
  • GPU / imageData
  • GPU / quad
  • GPU / spriteBatch
  • WEB / response
Edit

GPU - quad

Quad, a region from an image, used when drawing an image to only draw that section.

  • Available since: GPU: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: GPU: v1.0.0, LIKO-12: v0.8.0

Methods:


quad:getTextureDimensions

Gets reference image dimensions initially specified in GPU.quad().

  • Available since: quad: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: quad: v1.0.0, LIKO-12: v0.6.0
sw, sh = quad:getTextureDimensions()

Returns:

  • sw (number): The image width used by the quad.
  • sh (number): The image height used by the quad.

quad:getViewport

Gets the current viewport of this quad.

  • Available since: quad: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: quad: v1.0.0, LIKO-12: v0.6.0
x, y, w, h = quad:getViewport()

Returns:

  • x (number): The x coord of the quad's top-left corner.
  • y (number): The y coord of the quad's top-left corner.
  • w (number): The width of the quad.
  • h (number): The height of the quad.

quad:setViewport

Sets the viewport of the quad.

  • Available since: quad: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: quad: v1.0.0, LIKO-12: v0.6.0
quad:setViewport(x, y, w, h)

Arguments:

  • <x> (number): The x coord of the quad's top-left corner.
  • <y> (number): The y coord of the quad's top-left corner.
  • <w> (number): The width of the quad.
  • <h> (number): The height of the quad.

quad:type

Gets the type of the object as a string.

  • Available since: quad: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: quad: v1.0.0, LIKO-12: v0.6.0
type = quad:type()

Returns:

  • type (string): The object type, (Quad).

quad:typeOf

Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.

  • Available since: quad: v1.0.0, LIKO-12: v0.6.0
  • Last updated in: quad: v1.0.0, LIKO-12: v0.6.0

For GPUQuad, it returns true for the folowing types: 'Object', 'Quad'

bool = quad:typeOf(type)

Arguments:

  • <type> (string): The name of the type to check for.

Returns:

  • bool (boolean): True if the object is of the specified type, false otherwise.
← GPU / imageDataGPU / spriteBatch →
  • Methods:
    • quad:getTextureDimensions
    • quad:getViewport
    • quad:setViewport
    • quad:type
    • quad:typeOf
LIKO-12
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
Project Chat (Discord)Twitter
More
BlogGitHubStar
Copyright © 2020 The LIKO-12 Organization