// Adds rotation and horizontal/vertical flipping
rotation = rotation % 360;
if (rotation != 0 || flipH || flipV)
{
canvas.rotate(rotation, flipH, flipV, state.getCenterX(),
state.getCenterY());
}
// Note: Overwritten in mxStencil.paintShape (can depend on aspect)
double scale = state.getView().getScale();