Changeset 151 for trunk/UGame.pas
- Timestamp:
- Nov 14, 2017, 11:11:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGame.pas
r149 r151 150 150 end; 151 151 152 TMapShape = (msRectangle, msImage );152 TMapShape = (msRectangle, msImage, msRounded); 153 153 154 154 { TMapArea } … … 1269 1269 Color: TColor; 1270 1270 Pos: TPoint; 1271 Center: TPoint; 1271 1272 begin 1272 1273 case Shape of … … 1281 1282 Result := Color <> clWhite; 1282 1283 end; 1284 msRounded: begin 1285 Rect := GetPixelRect; 1286 Center := Point(Rect.Left + Rect.Width div 2, Rect.Top + Rect.Height div 2); 1287 Result := Sqr(Coord.X - Center.X) / Sqr(Rect.Width div 2) + 1288 Sqr(Coord.Y - Center.Y) / Sqr(Rect.Height div 2) > 1; 1289 end 1283 1290 else Result := False; 1284 1291 end;
Note:
See TracChangeset
for help on using the changeset viewer.