12345678910111213141516171819202122232425262728293031 |
- class PixelSpacing {
- double _physicalDeltaY = 0.0;
- double _physicalDeltaX = 0.0;
- factory PixelSpacing.fill(double physicalDeltaX, double physicalDeltaY) {
- return PixelSpacing()
- .._physicalDeltaX = physicalDeltaX
- .._physicalDeltaY = physicalDeltaY;
- }
- PixelSpacing();
- /// Delta X
- double get physicalDeltaX => _physicalDeltaX;
- set physicalDeltaX(double val) {
- if (val != _physicalDeltaX) {
- _physicalDeltaX = val;
- }
- }
- /// Delta Y
- double get physicalDeltaY => _physicalDeltaY;
- set physicalDeltaY(double val) {
- if (val != _physicalDeltaY) {
- _physicalDeltaY = val;
- }
- }
- /// 是否为空数据
- bool get isEmpty => _physicalDeltaX == 0 || _physicalDeltaY == 0;
- }
|