@@ -78,7 +78,7 @@ static ConstraintImpl.Relative match(GeoRef relativeTo) {
78
78
* Contains a parameter to the given reference plus the provided fixed offset.
79
79
*
80
80
* @param relativeTo The relative geometry.
81
- * @param offset The offset to apply.
81
+ * @param offset The offset to apply.
82
82
*/
83
83
static ConstraintImpl .Relative relative (GeoRef relativeTo , double offset ) {
84
84
return new ConstraintImpl .Relative (relativeTo , offset );
@@ -88,7 +88,7 @@ static ConstraintImpl.Relative relative(GeoRef relativeTo, double offset) {
88
88
* Contains a parameter to the given reference plus the provided dynamic offset.
89
89
*
90
90
* @param relativeTo The relative geometry.
91
- * @param offset The dynamic offset to apply.
91
+ * @param offset The dynamic offset to apply.
92
92
*/
93
93
static ConstraintImpl .RelativeDynamic relative (GeoRef relativeTo , Supplier <Double > offset ) {
94
94
return new ConstraintImpl .RelativeDynamic (relativeTo , offset );
@@ -99,32 +99,64 @@ static ConstraintImpl.RelativeDynamic relative(GeoRef relativeTo, Supplier<Doubl
99
99
* Note: it is possible to go outside the given range if the given position is greater than 1 or less than 0.
100
100
* To prevent this call .clamp() on the returned constraint.
101
101
*
102
- * @param start The Start position.
103
- * @param end The End position.
102
+ * @param start The Start position.
103
+ * @param end The End position.
104
104
* @param position The position between start and end. (0=start to 1=end)
105
105
*/
106
106
static ConstraintImpl .Between between (GeoRef start , GeoRef end , double position ) {
107
107
return new ConstraintImpl .Between (start , end , position );
108
108
}
109
109
110
+ /**
111
+ * Contains a parameter to a fixed position between the two provided references.
112
+ * Note: it is possible to go outside the given range if the given position is greater than 1 or less than 0.
113
+ * To prevent this call .clamp() on the returned constraint.
114
+ * <p>
115
+ * This variant also allows a pixel offset.
116
+ *
117
+ * @param start The Start position.
118
+ * @param end The End position.
119
+ * @param position The position between start and end. (0=start to 1=end)
120
+ * @param offset position offset in pixels
121
+ */
122
+ static ConstraintImpl .BetweenOffset between (GeoRef start , GeoRef end , double position , double offset ) {
123
+ return new ConstraintImpl .BetweenOffset (start , end , position , offset );
124
+ }
125
+
110
126
/**
111
127
* Contains a parameter to a dynamic position between the two provided references.
112
128
* Note: it is possible to go outside the given range if the given position is greater than 1 or less than 0.
113
129
* To prevent this call .clamp() on the returned constraint.
114
130
*
115
- * @param start The Start position.
116
- * @param end The End position.
131
+ * @param start The Start position.
132
+ * @param end The End position.
117
133
* @param position The dynamic position between start and end. (0=start to 1=end)
118
134
*/
119
135
static ConstraintImpl .BetweenDynamic between (GeoRef start , GeoRef end , Supplier <Double > position ) {
120
136
return new ConstraintImpl .BetweenDynamic (start , end , position );
121
137
}
122
138
139
+ /**
140
+ * Contains a parameter to a dynamic position between the two provided references.
141
+ * Note: it is possible to go outside the given range if the given position is greater than 1 or less than 0.
142
+ * To prevent this call .clamp() on the returned constraint.
143
+ * <p>
144
+ * This variant also allows a pixel offset.
145
+ *
146
+ * @param start The Start position.
147
+ * @param end The End position.
148
+ * @param position The dynamic position between start and end. (0=start to 1=end)
149
+ * @param offset Dynamic position offset in pixels
150
+ */
151
+ static ConstraintImpl .BetweenDynamic between (GeoRef start , GeoRef end , Supplier <Double > position , Supplier <Double > offset ) {
152
+ return new ConstraintImpl .BetweenOffsetDynamic (start , end , position , offset );
153
+ }
154
+
123
155
/**
124
156
* Contains a parameter to the mid-point between the two provided references.
125
157
*
126
158
* @param start The Start position.
127
- * @param end The End position.
159
+ * @param end The End position.
128
160
*/
129
161
static ConstraintImpl .MidPoint midPoint (GeoRef start , GeoRef end ) {
130
162
return new ConstraintImpl .MidPoint (start , end , 0 );
@@ -133,8 +165,8 @@ static ConstraintImpl.MidPoint midPoint(GeoRef start, GeoRef end) {
133
165
/**
134
166
* Contains a parameter to the mid-point between the two provided references with a fixed offset.
135
167
*
136
- * @param start The Start position.
137
- * @param end The End position.
168
+ * @param start The Start position.
169
+ * @param end The End position.
138
170
* @param offset offset distance.
139
171
*/
140
172
static ConstraintImpl .MidPoint midPoint (GeoRef start , GeoRef end , double offset ) {
@@ -144,8 +176,8 @@ static ConstraintImpl.MidPoint midPoint(GeoRef start, GeoRef end, double offset)
144
176
/**
145
177
* Contains a parameter to the mid-point between the two provided references with a dynamic offset.
146
178
*
147
- * @param start The Start position.
148
- * @param end The End position.
179
+ * @param start The Start position.
180
+ * @param end The End position.
149
181
* @param offset offset distance suppler.
150
182
*/
151
183
static ConstraintImpl .MidPointDynamic midPoint (GeoRef start , GeoRef end , Supplier <Double > offset ) {
0 commit comments