@@ -1152,24 +1152,23 @@ TEST_F(RenderedTargetTest, TouchingColor)
1152
1152
EXPECT_CALL (target2, stageModel ()).WillRepeatedly (Return (nullptr ));
1153
1153
EXPECT_CALL (penLayer, getBounds ()).WillRepeatedly (ReturnRef (penBounds));
1154
1154
1155
- static const QRgb color1 = 4286611711 ; // "purple"
1156
- static const QRgb color2 = 596083443 ; // close to color1 and transparent
1157
- static const Value color3 = " #808000" ; // "olive" (4286611456)
1158
- static const QRgb color3Int = 4286611456 ;
1155
+ static const Rgb color1 = 4286611711 ; // "purple"
1156
+ static const Rgb color2 = 596083443 ; // close to color1 and transparent
1157
+ static const Rgb color3 = 4286611456 ; // "olive"
1159
1158
static const QRgb color4 = 2505545047 ; // transparent "hippie green"
1160
1159
static const QRgb color5 = 4287417025 ; // color1 + color4
1161
1160
1162
1161
EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1163
1162
EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1164
1163
EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 1 , -8 )));
1165
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1166
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1167
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1168
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1169
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1170
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1164
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1165
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1166
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1167
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1168
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1169
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1171
1170
EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color4));
1172
- EXPECT_CALL (target1, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1171
+ EXPECT_CALL (target1, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
1173
1172
EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
1174
1173
EXPECT_CALL (target1, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
1175
1174
EXPECT_CALL (penLayer, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
@@ -1179,47 +1178,47 @@ TEST_F(RenderedTargetTest, TouchingColor)
1179
1178
EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1180
1179
EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1181
1180
EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 1 , -8 )));
1182
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1181
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1183
1182
EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color1));
1184
1183
ASSERT_TRUE (target.touchingColor (color1));
1185
1184
1186
1185
EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (5 , 1 , 6 , -5 )));
1187
1186
EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (5 , 1 , 6 , -5 )));
1188
1187
EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 2 , -8 )));
1189
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1190
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1191
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1192
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1193
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1188
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1189
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1190
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1191
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1192
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1194
1193
EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color4));
1195
- EXPECT_CALL (target1, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1196
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1197
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color3Int ));
1194
+ EXPECT_CALL (target1, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1195
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
1196
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color3 ));
1198
1197
ASSERT_FALSE (target.touchingColor (color1));
1199
1198
1200
1199
EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1201
1200
EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1202
1201
EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -6 , 2 , -8 )));
1203
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1204
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1205
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1206
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1207
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1208
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1209
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1202
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1203
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1204
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1205
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1206
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1207
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1208
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
1210
1209
EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color1));
1211
1210
ASSERT_TRUE (target.touchingColor (color2));
1212
1211
1213
1212
EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1214
1213
EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
1215
1214
EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -6.5 , 1.8 , -8 )));
1216
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1217
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1218
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1219
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1220
- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1221
- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1222
- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1215
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1216
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1217
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1218
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1219
+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1220
+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1221
+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
1223
1222
EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
1224
1223
EXPECT_CALL (target1, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color1));
1225
1224
ASSERT_FALSE (target.touchingColor (color1));
0 commit comments