source: trunk/src/org/expeditee/gio/gesture/data/ScaleGestureData.java@ 1097

Last change on this file since 1097 was 1097, checked in by davidb, 6 years ago

Newly structured files from Corey's work on logic/graphics separation

File size: 858 bytes
Line 
1package org.expeditee.gio.gesture.data;
2
3import org.expeditee.core.Point;
4
5/**
6 * Gesture data for scale gesture.
7 *
8 * @author cts16
9 */
10public class ScaleGestureData extends ItemSpecificGestureData {
11
12 private int _scaleFactor;
13
14 public ScaleGestureData(int scaleFactor)
15 {
16 super();
17 _scaleFactor = scaleFactor;
18 }
19
20 /**
21 * @param centreOfScale
22 * Position to scale outward from. Should be
23 * null to scale relative to item.
24 *
25 * @param scaleFactor
26 */
27 public ScaleGestureData(Point centreOfScale, int scaleFactor)
28 {
29 super(centreOfScale);
30 _scaleFactor = scaleFactor;
31 }
32
33 public ScaleGestureData(ScaleGestureData other)
34 {
35 super(other);
36 _scaleFactor = other._scaleFactor;
37 }
38
39 public int getScaleFactor()
40 {
41 return _scaleFactor;
42 }
43
44 @Override
45 public GestureData clone()
46 {
47 return new ScaleGestureData(this);
48 }
49
50}
Note: See TracBrowser for help on using the repository browser.