mirror of
https://github.com/olgamiller/SSTVEncoder2.git
synced 2025-12-06 06:52:01 +01:00
Send Labels also without image
This commit is contained in:
parent
b2574a666d
commit
eefa55bb6d
|
|
@ -160,6 +160,8 @@ public class CropView extends ImageView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rotateImage(int orientation) {
|
public void rotateImage(int orientation) {
|
||||||
|
if (!mImageOK)
|
||||||
|
return;
|
||||||
mOrientation += orientation;
|
mOrientation += orientation;
|
||||||
mOrientation %= 360;
|
mOrientation %= 360;
|
||||||
if (orientation == 90 || orientation == 270) {
|
if (orientation == 90 || orientation == 270) {
|
||||||
|
|
@ -167,11 +169,9 @@ public class CropView extends ImageView {
|
||||||
mImageWidth = mImageHeight;
|
mImageWidth = mImageHeight;
|
||||||
mImageHeight = tmp;
|
mImageHeight = tmp;
|
||||||
}
|
}
|
||||||
if (mImageOK) {
|
|
||||||
resetInputRect();
|
resetInputRect();
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void setNoBitmap() {
|
public void setNoBitmap() {
|
||||||
mImageOK = false;
|
mImageOK = false;
|
||||||
|
|
@ -350,18 +350,15 @@ public class CropView extends ImageView {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bitmap getBitmap() {
|
public Bitmap getBitmap() {
|
||||||
if (!mImageOK)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
Bitmap result = Bitmap.createBitmap(mModeSize.width(), mModeSize.height(), Bitmap.Config.ARGB_8888);
|
Bitmap result = Bitmap.createBitmap(mModeSize.width(), mModeSize.height(), Bitmap.Config.ARGB_8888);
|
||||||
mImageDrawRect.set(getIntRect(mInputRect));
|
|
||||||
adjustCanvasAndImageRect(mModeSize.width(), mModeSize.height());
|
|
||||||
|
|
||||||
Canvas canvas = new Canvas(result);
|
Canvas canvas = new Canvas(result);
|
||||||
canvas.drawColor(Color.BLACK);
|
canvas.drawColor(Color.BLACK);
|
||||||
|
if (mImageOK) {
|
||||||
|
mImageDrawRect.set(getIntRect(mInputRect));
|
||||||
|
adjustCanvasAndImageRect(mModeSize.width(), mModeSize.height());
|
||||||
drawBitmap(canvas);
|
drawBitmap(canvas);
|
||||||
|
}
|
||||||
mLabelCollection.draw(canvas, mOutputRect, new Rect(0, 0, mModeSize.width(), mModeSize.height()));
|
mLabelCollection.draw(canvas, mOutputRect, new Rect(0, 0, mModeSize.width(), mModeSize.height()));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue