Background_create_gradient - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Notation

Description

Creates a gradient background consisting of two colors and returns the index.

Parameters

  • w: width of the new background
  • h: height of the new background
  • col1: first color of the gradient
  • col2: second color of the gradient
  • kind: defines the direction of the gradient.
  0=horizontal
  1=vertical
  2=rectangle
  3=ellipse
  4=double horizontal
  5=double vertical

Return Values

int: Returns the index of the new background created with a gradient.

Example Call

    //The following example creates a green and white vertical gradient that is 400px by 400px and then draws it
    background1 = background_create_color(400,400,c_green,c_white,1);
    draw_background(background1,0,0);

NOTOC