Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background is being ignored on a HCanvas #166

Open
danieltorrer opened this issue Jun 9, 2019 · 2 comments
Open

Background is being ignored on a HCanvas #166

danieltorrer opened this issue Jun 9, 2019 · 2 comments
Assignees
Labels

Comments

@danieltorrer
Copy link

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

@tracerstar
Copy link
Collaborator

Regarding the related issue with init H without a background, this is expected behaviour. HYPE has a default background color of #ECF2F5, so that is not a bug. I'll discuss with Josh if we want to change the default BG color, but really it would only be white or black if we do that.

As for the canvas background not setting, that does appear to be a bug. Internally it looks as if background is setting a fill (which is weird). I'll need to look into it further.

@tracerstar tracerstar added the bug label Aug 23, 2019
@tracerstar tracerstar self-assigned this Aug 23, 2019
@NicTanghe
Copy link

NicTanghe commented Feb 29, 2020

how did u get hype itself working ?
the import doesn't work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants