CanvasIcon old;
timelineCanvas = screenSpaceCanvasFactory.createCanvas(ScreenSpaceCanvasType.RIGHT_OF_TIMELINE);
timelineCanvas.removeShape(old);
I am trying to remove an old CanvasIcon after I am done with it using the code above, but the icon remains on the screen. Is there something else that I need to do? I have N number of icons that I want to remain on the screen, and just the one to be removed.
Canvas removeShape help
-
- Posts: 43
- Joined: Mon Feb 08, 2021 5:37 pm
- Been thanked: 1 time
-
- Site Admin
- Posts: 278
- Joined: Mon Jun 11, 2018 11:44 am
- Has thanked: 2 times
- Been thanked: 31 times
Re: Canvas removeShape help
Are you sure the icon that you are removing is actually the same one you added? I assume your code sample is incomplete (uninitialized variable, freshly created canvas with no icons has icon removed from it), so if possible please provide a more complete example.
-
- Posts: 43
- Joined: Mon Feb 08, 2021 5:37 pm
- Been thanked: 1 time