• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icapps / flutter-custom-image-crop / 6545506866

17 Oct 2023 09:53AM UTC coverage: 0.0%. Remained the same
6545506866

Pull #45

github

web-flow
Merge bff8ba3a1 into 75def6bbd
Pull Request #45: optimize fillcropscpace imagefit

130 of 130 new or added lines in 3 files covered. (100.0%)

0 of 485 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/src/models/model.dart
1
import 'dart:math';
2

3
/// The data that handles the transformation of the cropped image.
4
class CropImageData {
5
  /// Horizontal translation of the cropped image
6
  double x;
7

8
  /// Vertical translation of the cropped image
9
  double y;
10

11
  /// The rotation of the cropped image
12
  double angle;
13

14
  /// The scale of the cropped image
15
  double scale;
16

17
  /// The data that handles the transformation of the cropped image.
18
  CropImageData({this.x = 0, this.y = 0, this.angle = 0, this.scale = 1});
×
19

20
  /// When adding two data objects, the translation is added, the rotation is added and the scale is multiplied.
21
  CropImageData operator +(CropImageData other) => CropImageData(
×
22
      x: x + other.x,
×
23
      y: y + other.y,
×
24
      angle: (angle + other.angle) % (2 * pi),
×
25
      scale: scale * other.scale);
×
26

27
  /// When subtracting two data objects, the translation is subtracted, the rotation is subtracted and the scale is divided.
28
  CropImageData operator -(CropImageData other) => CropImageData(
×
29
      x: x - other.x,
×
30
      y: y - other.y,
×
31
      angle: (angle - other.angle) % (2 * pi),
×
32
      scale: other.scale / scale);
×
33

34
  /// Representation of the data as a string.
35
  String toString() => "{x: $x, y: $y, angle: $angle, scale: $scale}";
×
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc