Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B bjgf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 127
    • Issues 127
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • BlueJ
  • bjgf
  • Issues
  • #1435
Closed
Open
Issue created Feb 08, 2008 by Neil Brown@nccbMaintainer

[GREENFOOT-91] Can't draw on GreenfootImages after using mirror/scale/rotate on the image

Here is an Actor which is showing the behaviour. The rectangle should keep growing and changing each frame. When you click on it, it will flip it's image, and the draw it's doing each frame no longer works.

import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot) import java.awt.Color;

public class TestActor extends Actor { private int rectHeight = 0; public void act() { getImage().clear(); getImage().setColor(Color.BLUE); // draw a rectangle over the left side of the actors imge getImage().fillRect( 0, 0, getImage().getWidth()/2, rectHeight % getImage().getHeight()); rectHeight++; if (Greenfoot.mousePressed(this)) { getImage().mirrorHorizontally(); } }
}


Issue metadata

  • Issue type: Bug
  • Priority: Medium
  • Fix versions: 1.4.0
Assignee
Assign to
Time tracking