| 1 | // Copyright 2004-2007 Jean-Francois Poilpret |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package net.sourceforge.hiveboard.drawing; |
| 16 | |
| 17 | import java.awt.Rectangle; |
| 18 | |
| 19 | /** |
| 20 | * |
| 21 | */ |
| 22 | public class ImageToolSettings |
| 23 | { |
| 24 | public void setInsertArea(Rectangle insertArea) |
| 25 | { |
| 26 | _insertArea = new Rectangle(insertArea); |
| 27 | } |
| 28 | public Rectangle getInsertArea() |
| 29 | { |
| 30 | return new Rectangle(_insertArea); |
| 31 | } |
| 32 | |
| 33 | public void setScaled(boolean scaled) |
| 34 | { |
| 35 | _scaled = scaled; |
| 36 | } |
| 37 | public boolean isScaled() |
| 38 | { |
| 39 | return _scaled; |
| 40 | } |
| 41 | |
| 42 | public void setKeepAspect(boolean keepAspect) |
| 43 | { |
| 44 | _keepAspect = keepAspect; |
| 45 | } |
| 46 | public boolean isKeepAspect() |
| 47 | { |
| 48 | return _keepAspect; |
| 49 | } |
| 50 | |
| 51 | public void setUserAlpha(boolean userAlpha) |
| 52 | { |
| 53 | _userAlpha = userAlpha; |
| 54 | } |
| 55 | public boolean isUserAlpha() |
| 56 | { |
| 57 | return _userAlpha; |
| 58 | } |
| 59 | |
| 60 | public void setAlpha(float alpha) |
| 61 | { |
| 62 | _alpha = alpha; |
| 63 | } |
| 64 | public float getAlpha() |
| 65 | { |
| 66 | return _alpha; |
| 67 | } |
| 68 | |
| 69 | private Rectangle _insertArea; |
| 70 | private boolean _scaled; |
| 71 | private boolean _keepAspect; |
| 72 | private boolean _userAlpha; |
| 73 | private float _alpha; |
| 74 | } |