posted 19 years ago
I'm drawing shapes on top of an image using a subclass of JLabel. The problem is the image can be scaled (zoomed) in or out and I need each Shape to be scaled to be larger or smaller with the image. This is pretty easy with something simple like a Rectangle, just multiply the width, height, x and y values by the same scale as the image. I need to scale a generic Shape, however, not just a Rectangle and I don't see how I could do this.