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) {
|
||||
if (!mImageOK)
|
||||
return;
|
||||
mOrientation += orientation;
|
||||
mOrientation %= 360;
|
||||
if (orientation == 90 || orientation == 270) {
|
||||
|
|
@ -167,11 +169,9 @@ public class CropView extends ImageView {
|
|||
mImageWidth = mImageHeight;
|
||||
mImageHeight = tmp;
|
||||
}
|
||||
if (mImageOK) {
|
||||
resetInputRect();
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public void setNoBitmap() {
|
||||
mImageOK = false;
|
||||
|
|
@ -350,18 +350,15 @@ public class CropView extends ImageView {
|
|||
}
|
||||
|
||||
public Bitmap getBitmap() {
|
||||
if (!mImageOK)
|
||||
return null;
|
||||
|
||||
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.drawColor(Color.BLACK);
|
||||
if (mImageOK) {
|
||||
mImageDrawRect.set(getIntRect(mInputRect));
|
||||
adjustCanvasAndImageRect(mModeSize.width(), mModeSize.height());
|
||||
drawBitmap(canvas);
|
||||
}
|
||||
mLabelCollection.draw(canvas, mOutputRect, new Rect(0, 0, mModeSize.width(), mModeSize.height()));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue