|
@@ -116,12 +116,12 @@
|
|
|
[_textViewController.view mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.top.equalTo(_segmentedControl.mas_bottom).offset(0);
|
|
|
make.width.equalTo(_segmentedControl.mas_width);
|
|
|
- make.bottom.equalTo(self.view).offset(0);
|
|
|
+ make.bottom.equalTo(self.view).offset(-34);
|
|
|
}];
|
|
|
[_imageViewController.view mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.top.equalTo(_segmentedControl.mas_bottom).offset(0);
|
|
|
make.width.equalTo(_segmentedControl.mas_width);
|
|
|
- make.bottom.equalTo(self.view).offset(0);
|
|
|
+ make.bottom.equalTo(self.view).offset(-34);
|
|
|
}];
|
|
|
[_textViewController.textPreview.documentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.centerX.equalTo(_textViewController.textPreview.mas_centerX);
|
|
@@ -145,27 +145,27 @@
|
|
|
[_textViewController.textPreview.documentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.centerX.equalTo(_textViewController.textPreview.mas_centerX);
|
|
|
make.centerY.equalTo(_textViewController.textPreview.mas_centerY);
|
|
|
- make.width.equalTo(@(_imageSize.width / 3.1));
|
|
|
- make.height.equalTo(@(_imageSize.height / 2.6));
|
|
|
+ make.width.equalTo(@(_imageSize.width / 3));
|
|
|
+ make.height.equalTo(@(_imageSize.height / 3));
|
|
|
}];
|
|
|
[_imageViewController.imagePreview.documentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.centerX.equalTo(_imageViewController.imagePreview.mas_centerX);
|
|
|
make.centerY.equalTo(_imageViewController.imagePreview.mas_centerY);
|
|
|
- make.width.equalTo(@(_imageSize.width / 3.1));
|
|
|
- make.height.equalTo(@(_imageSize.height / 2.6));
|
|
|
+ make.width.equalTo(@(_imageSize.width / 3));
|
|
|
+ make.height.equalTo(@(_imageSize.height / 3));
|
|
|
}];
|
|
|
} else {
|
|
|
[_textViewController.textPreview.documentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.centerX.equalTo(_textViewController.textPreview.mas_centerX);
|
|
|
make.centerY.equalTo(_textViewController.textPreview.mas_centerY);
|
|
|
- make.width.equalTo(@(_imageSize.width / 2.4));
|
|
|
- make.height.equalTo(@(_imageSize.height / 2.9));
|
|
|
+ make.width.equalTo(@(_imageSize.width / 3));
|
|
|
+ make.height.equalTo(@(_imageSize.height / 3.3));
|
|
|
}];
|
|
|
[_imageViewController.imagePreview.documentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.centerX.equalTo(_imageViewController.imagePreview.mas_centerX);
|
|
|
make.centerY.equalTo(_imageViewController.imagePreview.mas_centerY);
|
|
|
- make.width.equalTo(@(_imageSize.width / 2.4));
|
|
|
- make.height.equalTo(@(_imageSize.height / 2.9));
|
|
|
+ make.width.equalTo(@(_imageSize.width / 3));
|
|
|
+ make.height.equalTo(@(_imageSize.height / 3.3));
|
|
|
}];
|
|
|
}
|
|
|
|
|
@@ -221,8 +221,8 @@
|
|
|
_textWatermark.opacity = _textViewController.dataModel.watermarkOpacity;
|
|
|
_textWatermark.scale = _textViewController.dataModel.watermarkScale;
|
|
|
_textWatermark.isTilePage = _textViewController.dataModel.isTile;
|
|
|
- _textWatermark.tx = _textViewController.dataModel.tx;
|
|
|
- _textWatermark.ty = _textViewController.dataModel.ty;
|
|
|
+ _textWatermark.tx = _textViewController.dataModel.tx * _imageSize.width / _textViewController.textPreview.documentView.frame.size.width;
|
|
|
+ _textWatermark.ty = _textViewController.dataModel.ty * _imageSize.height / _textViewController.textPreview.documentView.frame.size.height;
|
|
|
_textWatermark.rotation = _textViewController.dataModel.watermarkRotation;
|
|
|
|
|
|
if (_textWatermark.isTilePage) {
|
|
@@ -245,8 +245,8 @@
|
|
|
_imageWatermark.opacity = _imageViewController.dataModel.watermarkOpacity;
|
|
|
_imageWatermark.scale = _imageViewController.dataModel.watermarkScale;
|
|
|
_imageWatermark.isTilePage = _imageViewController.dataModel.isTile;
|
|
|
- _imageWatermark.tx = _imageViewController.dataModel.tx;
|
|
|
- _imageWatermark.ty = _imageViewController.dataModel.ty;
|
|
|
+ _imageWatermark.tx = _imageViewController.dataModel.tx * _imageSize.width / _imageViewController.imagePreview.documentView.frame.size.width;
|
|
|
+ _imageWatermark.ty = _imageViewController.dataModel.ty * _imageSize.height / _imageViewController.imagePreview.documentView.frame.size.height;
|
|
|
_imageWatermark.rotation = _imageViewController.dataModel.watermarkRotation;
|
|
|
|
|
|
if (_imageWatermark.isTilePage) {
|