Skip to content

Background is being ignored on a HCanvas #166

@danieltorrer

Description

@danieltorrer

The background property is being ignored when is set on an HCanvas.

Example:

import hype.*;

HCanvas hCanvas;
HRect rect;

void setup() {
  size(500, 500);
  H.init(this).background(#00ff00); // this is green

  hCanvas = new HCanvas().background(#ff0000); // this is red
  H.add(hCanvas);

  hCanvas.add( rect = new HRect(100) ).fill(#ff44bb).rotate(45).loc(width/2, height/2);
  H.drawStage();
  noLoop();
}

Screenshot

demo

Expected behaviour

Background should be red, as is the background color set on the HCanvas.

Related

Also, if you init H without background color the sketch will have a blueish bg. i.e. H.init(this);

Info

OS: Mac 10.14.5 (also in Win10)
P: 3.5.3
Hype: 2.1.0

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions