diff --git a/app/src/main/java/anupam/acrylic/EasyPaint.java b/app/src/main/java/anupam/acrylic/EasyPaint.java index eb962ac..34b5be8 100644 --- a/app/src/main/java/anupam/acrylic/EasyPaint.java +++ b/app/src/main/java/anupam/acrylic/EasyPaint.java @@ -1,681 +1,679 @@ /* * Copyright (C) 2014, 2016 Valerio Bozzolan & James Dearing (TheOpenSourceNinja) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package anupam.acrylic; import android.annotation.SuppressLint; -import android.app.ActionBar; import android.app.AlertDialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import android.graphics.BitmapShader; import android.graphics.BlurMaskFilter; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.EmbossMaskFilter; import android.graphics.MaskFilter; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Point; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Shader; -import android.graphics.drawable.ColorDrawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.provider.MediaStore; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RSIllegalArgumentException; import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; import android.util.Log; import android.view.Display; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.SeekBar; import android.widget.TextView; import android.widget.Toast; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Calendar; @SuppressLint("ClickableViewAccessibility") public class EasyPaint extends GraphicsActivity implements ColorPickerDialog.OnColorChangedListener { private static final float TOUCH_TOLERANCE = 4; private static final int CHOOSE_IMAGE = 0; public static int DEFAULT_BRUSH_SIZE = 10; private static int MAX_POINTERS = 10; private Paint mPaint; private MaskFilter mEmboss; private MaskFilter mBlur; private boolean doubleBackToExitPressedOnce = false; private MyView contentView; private boolean waitingForBackgroundColor = false; //If true and colorChanged() is called, fill the background, else mPaint.setColor() private boolean extractingColor = false; //If this is true, the next touch event should extract a color rather than drawing a line. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // it removes the title from the actionbar(more space for icons?) // this.getActionBar().setDisplayShowTitleEnabled(false); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); contentView = new MyView(this); setContentView(contentView); mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setDither(true); mPaint.setColor(Color.GREEN); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeJoin(Paint.Join.ROUND); mPaint.setStrokeCap(Paint.Cap.ROUND); mPaint.setStrokeWidth(DEFAULT_BRUSH_SIZE); // Where did these magic numbers come from? What do they mean? Can I change them? ~TheOpenSourceNinja // Absolutely random numbers in order to see the emboss. asd! ~Valerio mEmboss = new EmbossMaskFilter(new float[]{1, 1, 1}, 0.4f, 6, 3.5f); mBlur = new BlurMaskFilter(5, BlurMaskFilter.Blur.NORMAL); if (isFirstTime()) { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.app_name); alert.setMessage(R.string.app_description); alert.setNegativeButton(R.string.continue_fuck, (dialog, whichButton) -> Toast.makeText(getApplicationContext(), R.string.here_is_your_canvas, Toast.LENGTH_SHORT).show()); alert.show(); } else { Toast.makeText(getApplicationContext(), R.string.here_is_your_canvas, Toast.LENGTH_SHORT).show(); } loadFromIntents(); } @Override public void onBackPressed() { if (doubleBackToExitPressedOnce) { super.onBackPressed(); return; } this.doubleBackToExitPressedOnce = true; Toast.makeText(this, R.string.press_back_again, Toast.LENGTH_SHORT) .show(); new Handler().postDelayed(() -> doubleBackToExitPressedOnce = false, 3000); } public void colorChanged(int color) { if (waitingForBackgroundColor) { waitingForBackgroundColor = false; contentView.mBitmapBackground.eraseColor(color); //int[] colors = new int[1]; //colors[0] = color; //contentView.mBitmapBackground = Bitmap.createBitmap(colors, contentView.mBitmapBackground.getWidth(), contentView.mBitmapBackground.getHeight(), contentView.mBitmapBackground.getConfig()); } else { // Changes the color of the action bar when the pencil color is changed // TODO: Figure out how to deal with choosing white color /*ActionBar actionBar = getActionBar(); ColorDrawable colorDrawable = new ColorDrawable(color); actionBar.setBackgroundDrawable(colorDrawable);*/ mPaint.setColor(color); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { mPaint.setXfermode(null); mPaint.setAlpha(0xFF); switch (item.getItemId()) { case R.id.extract_color_menu: { Toast.makeText(getApplicationContext(), R.string.tap_to_extract_color, Toast.LENGTH_LONG).show(); extractingColor = true; return true; } - case R.id.normal_brush_menu: + case R.id.brush_menu: mPaint.setShader(null); mPaint.setMaskFilter(null); return true; - case R.id.color_menu: + case R.id.palette_menu: new ColorPickerDialog(this, this, mPaint.getColor()).show(); return true; case R.id.emboss_menu: mPaint.setShader(null); mPaint.setMaskFilter(mEmboss); return true; case R.id.smudge_menu: { /* I considered making this what happens when the blur_menu item is selected, but * that could surprise users who are used to blur_menu's previous functionality, so * I made this new smudge_menu item instead. I don't like calling it "Smudge" because * this isn't exactly the same as what Photoshop and GIMP refer to as "Smudge", but I * couldn't think of a better name that isn't "Blur". * ~TheOpenSourceNinja */ if (Build.VERSION.SDK_INT >= 17) { /* Basically what we're doing here is copying the entire foreground bitmap, * blurring it, then telling mPaint to use that instead of a solid color. */ RenderScript rs = RenderScript.create(getApplicationContext()); ScriptIntrinsicBlur script; try { script = ScriptIntrinsicBlur.create(rs, Element.RGBA_8888(rs)); } catch (RSIllegalArgumentException e) { script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); } script.setRadius(20f); //The radius must be between 0 and 25. Smaller radius means less blur. I just picked 20 randomly. ~TheOpenSourceNinja //copy the foreground: (n API level 18+, this will be really fast because it uses a shared memory model, thus not really copying everything) Allocation input = Allocation.createFromBitmap(rs, contentView.mBitmap); script.setInput(input); //allocate memory for the output: Allocation output = Allocation.createTyped(rs, input.getType()); //Blur the image: script.forEach(output); //Store the blurred image as a Bitmap object: Bitmap blurred = Bitmap.createBitmap(contentView.mBitmap); output.copyTo(blurred); //Tell mPaint to use the blurred image: Shader shader = new BitmapShader(blurred, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); mPaint.setShader(shader); } else { Toast.makeText(this.getApplicationContext(), anupam.acrylic.R.string.ability_disabled_need_newer_api_level, Toast.LENGTH_LONG).show(); } return true; } case R.id.blur_menu: mPaint.setShader(null); mPaint.setMaskFilter(mBlur); return true; case R.id.size_menu: { LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.brush, (ViewGroup) findViewById(R.id.root)); AlertDialog.Builder builder = new AlertDialog.Builder(this) .setView(layout); builder.setTitle(R.string.choose_width); final AlertDialog alertDialog = builder.create(); alertDialog.show(); SeekBar sb = (SeekBar) layout.findViewById(R.id.brushSizeSeekBar); sb.setProgress(getStrokeSize()); final TextView txt = (TextView) layout .findViewById(R.id.sizeValueTextView); txt.setText(String.format( getResources().getString(R.string.your_selected_size_is), getStrokeSize() + 1)); sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { public void onProgressChanged(SeekBar seekBar, final int progress, boolean fromUser) { // Do something here with new value mPaint.setStrokeWidth(progress); txt.setText(String.format( getResources().getString( R.string.your_selected_size_is), progress + 1)); } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } }); return true; } case R.id.erase_menu: { LayoutInflater inflater_e = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); View layout_e = inflater_e.inflate(R.layout.brush, (ViewGroup) findViewById(R.id.root)); AlertDialog.Builder builder_e = new AlertDialog.Builder(this) .setView(layout_e); builder_e.setTitle(R.string.choose_width); final AlertDialog alertDialog_e = builder_e.create(); alertDialog_e.show(); SeekBar sb_e = (SeekBar) layout_e.findViewById(R.id.brushSizeSeekBar); sb_e.setProgress(getStrokeSize()); final TextView txt_e = (TextView) layout_e .findViewById(R.id.sizeValueTextView); txt_e.setText(String.format( getResources().getString(R.string.your_selected_size_is), getStrokeSize() + 1)); sb_e.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { public void onProgressChanged(SeekBar seekBar, final int progress, boolean fromUser) { // Do something here with new value mPaint.setStrokeWidth(progress); txt_e.setText(String.format( getResources().getString( R.string.your_selected_size_is), progress + 1)); } public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } }); mPaint.setShader(null); mPaint.setXfermode(new PorterDuffXfermode(Mode.CLEAR)); return true; } case R.id.clear_all_menu: { contentView.mBitmap.eraseColor(Color.TRANSPARENT); return true; } case R.id.save_menu: takeScreenshot(true); break; case R.id.share_menu: { File screenshotPath = takeScreenshot(false); Intent i = new Intent(); i.setAction(Intent.ACTION_SEND); i.setType("image/png"); i.putExtra(Intent.EXTRA_SUBJECT, getString(anupam.acrylic.R.string.share_title_template)); i.putExtra(Intent.EXTRA_TEXT, getString(anupam.acrylic.R.string.share_text_template)); i.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(screenshotPath)); try { startActivity(Intent.createChooser(i, getString(anupam.acrylic.R.string.toolbox_share_title))); } catch (ActivityNotFoundException ex) { Toast.makeText(this.getApplicationContext(), anupam.acrylic.R.string.no_way_to_share, Toast.LENGTH_LONG).show(); } break; } case R.id.open_image_menu: { Intent intent = new Intent(); intent.setType("image/*"); //The argument is an all-lower-case MIME type - in this case, any image format. intent.setAction(Intent.ACTION_GET_CONTENT); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, false); //This is false by default, but I felt that for code clarity it was better to be explicit: we only want one image startActivityForResult(Intent.createChooser(intent, getResources().getString(R.string.select_image_to_open)), CHOOSE_IMAGE); break; } case R.id.fill_background_with_color: { waitingForBackgroundColor = true; new ColorPickerDialog(this, this, contentView.mBitmapBackground.getPixel(0, 0)).show(); return true; } case R.id.about_menu: startActivity(new Intent(this, AboutActivity.class)); break; } return super.onOptionsItemSelected(item); } /** * This takes the screenshot of the whole screen. Is this a good thing? */ private File takeScreenshot(boolean showToast) { View v = findViewById(R.id.CanvasId); v.setDrawingCacheEnabled(true); Bitmap cachedBitmap = v.getDrawingCache(); Bitmap copyBitmap = cachedBitmap.copy(Bitmap.Config.RGB_565, true); v.destroyDrawingCache(); FileOutputStream output = null; File file; try { File path = Places.getScreenshotFolder(); Calendar cal = Calendar.getInstance(); file = new File(path, cal.get(Calendar.YEAR) + "_" + (1 + cal.get(Calendar.MONTH)) + "_" + cal.get(Calendar.DAY_OF_MONTH) + "_" + cal.get(Calendar.HOUR_OF_DAY) + "_" + cal.get(Calendar.MINUTE) + "_" + cal.get(Calendar.SECOND) + ".png"); output = new FileOutputStream(file); copyBitmap.compress(CompressFormat.PNG, 100, output); } catch (FileNotFoundException e) { file = null; e.printStackTrace(); } finally { if (output != null) { try { output.close(); } catch (IOException e) { e.printStackTrace(); } } } if (file != null) { if (showToast) Toast.makeText( getApplicationContext(), String.format( getResources().getString( R.string.saved_your_location_to), file.getAbsolutePath()), Toast.LENGTH_LONG) .show(); // sending a broadcast to the media scanner so it will scan the new // screenshot. Intent requestScan = new Intent( Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); requestScan.setData(Uri.fromFile(file)); sendBroadcast(requestScan); return file; } else { return null; } } private boolean isFirstTime() { SharedPreferences preferences = getPreferences(MODE_PRIVATE); boolean ranBefore = preferences.getBoolean("RanBefore", false); if (!ranBefore) { // first time SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("RanBefore", true); editor.commit(); } return !ranBefore; } private int getStrokeSize() { return (int) mPaint.getStrokeWidth(); } public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode != RESULT_CANCELED) { //"The resultCode will be RESULT_CANCELED if the activity explicitly returned that, didn't return any result, or crashed during its operation." (quote from https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int,%20int,%20android.content.Intent) ) if (requestCode == CHOOSE_IMAGE) { setBackgroundUri(data.getData()); } } } public void setBackgroundUri(Uri uri) { if (uri == null) { return; } try { //I don't like loading both full-sized and reduced-size copies of the image (the larger copy can use a lot of memory), but I couldn't find any other way to do this. Bitmap fullsize = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri); contentView.mBitmapBackground = Bitmap.createScaledBitmap(fullsize, contentView.mBitmap.getWidth(), contentView.mBitmap.getHeight(), true); //contentView.mCanvas = new Canvas(contentView.mBitmapBackground); } catch (IOException exception) { //TODO: How should we handle this exception? } } public void loadFromIntents() { Intent intent = getIntent(); String action = intent.getAction(); String type = intent.getType(); System.out.println("Intentoso " + action + " type " + type); if (Intent.ACTION_SEND.equals(action) && type != null) { if (type.startsWith("image/")) { setBackgroundUri((Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM)); } } } public class MyView extends View { public Bitmap mBitmap; private Bitmap mBitmapBackground; private Canvas mCanvas; private Paint mBitmapPaint; private MultiLinePathManager multiLinePathManager; public MyView(Context c) { super(c); setId(R.id.CanvasId); Display display = getWindowManager().getDefaultDisplay(); Point size = new Point(display.getWidth(), display.getHeight()); mBitmapBackground = Bitmap.createBitmap(size.x, size.y, Bitmap.Config.ARGB_8888); mBitmap = Bitmap.createBitmap(size.x, size.y, Bitmap.Config.ARGB_8888); mCanvas = new Canvas(mBitmap); mBitmapPaint = new Paint(Paint.DITHER_FLAG); multiLinePathManager = new MultiLinePathManager(MAX_POINTERS); } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); } @Override protected void onDraw(Canvas canvas) { canvas.drawColor(0xFFFFFFFF); canvas.drawBitmap(mBitmapBackground, 0, 0, new Paint()); canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint); for (int i = 0; i < multiLinePathManager.superMultiPaths.length; i++) { canvas.drawPath(multiLinePathManager.superMultiPaths[i], mPaint); } } @Override public boolean onTouchEvent(MotionEvent event) { LinePath linePath; int index; int id; int eventMasked = event.getActionMasked(); switch (eventMasked) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_POINTER_DOWN: { index = event.getActionIndex(); id = event.getPointerId(index); if (extractingColor) { //If the user chose the 'extract color' menu option, the touch event indicates where they want to extract the color from. extractingColor = false; View v = findViewById(R.id.CanvasId); v.setDrawingCacheEnabled(true); Bitmap cachedBitmap = v.getDrawingCache(); int newColor = cachedBitmap.getPixel(Math.round(event.getX(index)), Math.round(event.getY(index))); v.destroyDrawingCache(); colorChanged(newColor); Toast.makeText(getApplicationContext(), R.string.color_extracted, Toast.LENGTH_SHORT).show(); } else { linePath = multiLinePathManager.addLinePathWithPointer(id); if (linePath != null) { linePath.touchStart(event.getX(index), event.getY(index)); } else { Log.e("anupam", "Too many fingers!"); } } break; } case MotionEvent.ACTION_MOVE: for (int i = 0; i < event.getPointerCount(); i++) { id = event.getPointerId(i); index = event.findPointerIndex(id); linePath = multiLinePathManager.findLinePathFromPointer(id); if (linePath != null) { linePath.touchMove(event.getX(index), event.getY(index)); } } break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_POINTER_UP: case MotionEvent.ACTION_CANCEL: index = event.getActionIndex(); id = event.getPointerId(index); linePath = multiLinePathManager.findLinePathFromPointer(id); if (linePath != null) { linePath.lineTo(linePath.getLastX(), linePath.getLastY()); // Commit the path to our offscreen mCanvas.drawPath(linePath, mPaint); // Kill this so we don't double draw linePath.reset(); // Allow this LinePath to be associated to another idPointer linePath.disassociateFromPointer(); } break; } invalidate(); return true; } private class LinePath extends Path { private Integer idPointer; private float lastX; private float lastY; LinePath() { this.idPointer = null; } public float getLastX() { return lastX; } public float getLastY() { return lastY; } public void touchStart(float x, float y) { this.reset(); this.moveTo(x, y); this.lastX = x; this.lastY = y; } public void touchMove(float x, float y) { float dx = Math.abs(x - lastX); float dy = Math.abs(y - lastY); if (dx >= TOUCH_TOLERANCE || dy >= TOUCH_TOLERANCE) { this.quadTo(lastX, lastY, (x + lastX) / 2, (y + lastY) / 2); lastX = x; lastY = y; } } public boolean isDisassociatedFromPointer() { return idPointer == null; } public boolean isAssociatedToPointer(int idPointer) { return this.idPointer != null && (int) this.idPointer == idPointer; } public void disassociateFromPointer() { idPointer = null; } public void associateToPointer(int idPointer) { this.idPointer = idPointer; } } private class MultiLinePathManager { public LinePath[] superMultiPaths; MultiLinePathManager(int maxPointers) { superMultiPaths = new LinePath[maxPointers]; for (int i = 0; i < maxPointers; i++) { superMultiPaths[i] = new LinePath(); } } public LinePath findLinePathFromPointer(int idPointer) { for (LinePath superMultiPath : superMultiPaths) { if (superMultiPath.isAssociatedToPointer(idPointer)) { return superMultiPath; } } return null; } public LinePath addLinePathWithPointer(int idPointer) { for (LinePath superMultiPath : superMultiPaths) { if (superMultiPath.isDisassociatedFromPointer()) { superMultiPath.associateToPointer(idPointer); return superMultiPath; } } return null; } } } } diff --git a/app/src/main/res/drawable-hdpi/erase.png b/app/src/main/res/drawable-hdpi/erase.png deleted file mode 100644 index 59ab341..0000000 Binary files a/app/src/main/res/drawable-hdpi/erase.png and /dev/null differ diff --git a/app/src/main/res/drawable-mdpi/erase.png b/app/src/main/res/drawable-mdpi/erase.png deleted file mode 100644 index 411a24f..0000000 Binary files a/app/src/main/res/drawable-mdpi/erase.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/erase.png b/app/src/main/res/drawable-xhdpi/erase.png deleted file mode 100644 index 22782c4..0000000 Binary files a/app/src/main/res/drawable-xhdpi/erase.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxhdpi/erase.png b/app/src/main/res/drawable-xxhdpi/erase.png deleted file mode 100644 index 27a7b13..0000000 Binary files a/app/src/main/res/drawable-xxhdpi/erase.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/erase.png b/app/src/main/res/drawable-xxxhdpi/erase.png deleted file mode 100644 index 03e7017..0000000 Binary files a/app/src/main/res/drawable-xxxhdpi/erase.png and /dev/null differ diff --git a/app/src/main/res/drawable/blur.xml b/app/src/main/res/drawable/blur.xml index 7a72383..7526814 100644 --- a/app/src/main/res/drawable/blur.xml +++ b/app/src/main/res/drawable/blur.xml @@ -1,9 +1,9 @@ + android:pathData="M6,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM3,9.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM6,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,10.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM14,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM14,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM3,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM10,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM10,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM18,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM14,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM10,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM14,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5z" /> diff --git a/app/src/main/res/drawable/brush.xml b/app/src/main/res/drawable/brush.xml new file mode 100644 index 0000000..9456359 --- /dev/null +++ b/app/src/main/res/drawable/brush.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/clear_all.xml b/app/src/main/res/drawable/clear_all.xml index 99fe49e..fd8599c 100644 --- a/app/src/main/res/drawable/clear_all.xml +++ b/app/src/main/res/drawable/clear_all.xml @@ -1,9 +1,9 @@ + android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" /> diff --git a/app/src/main/res/drawable/color.xml b/app/src/main/res/drawable/color.xml deleted file mode 100644 index 1dc2657..0000000 --- a/app/src/main/res/drawable/color.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/erase.xml b/app/src/main/res/drawable/erase.xml new file mode 100644 index 0000000..4a5e968 --- /dev/null +++ b/app/src/main/res/drawable/erase.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/fill_background_with_color.xml b/app/src/main/res/drawable/fill_background_with_color.xml index 556e7fd..3979a63 100644 --- a/app/src/main/res/drawable/fill_background_with_color.xml +++ b/app/src/main/res/drawable/fill_background_with_color.xml @@ -1,9 +1,9 @@ + android:pathData="M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z" /> diff --git a/app/src/main/res/drawable/fill_background_with_color.xml b/app/src/main/res/drawable/palette.xml similarity index 100% copy from app/src/main/res/drawable/fill_background_with_color.xml copy to app/src/main/res/drawable/palette.xml diff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml index 3a38672..7e47efd 100644 --- a/app/src/main/res/menu/main.xml +++ b/app/src/main/res/menu/main.xml @@ -1,75 +1,75 @@ + + - - - + android:title="@string/fill_background_with_color" /> + android:title="@string/clear_all" /> + android:title="@string/save" /> + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index c2de90a..e7aa4a7 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -1,37 +1,37 @@ Acrylmalerei Acrylmalerei ist eine Freie und Quelloffene Software die Deine Kreativität freisetzt.\n\nÖffne das Menu für mehr Optionen.\n\nDank an Anupam Shrivastava für die Idee, an Valerio Bozzolan dafür, das Projekt wiederzubeleben, und Marco Gagino für die Unterstützung. Dank an alle Beitragenden!\n\nFrohes Malen :) Hier ist Deine Malfläche. Fang an zu malen! Farbe Dick auftragen Unschärfe Pinselgröße Löschen Vordergrund löschen Speichern Teilen Über Bild als Hintergrund öffnen Hintergrund mit Farbe füllen Gewählte Größe: %1$d Pinselgröße Kunstwerk unter %1$s gespeichert Auswählen Weiter OK Wähle eine Farbe Teilen Schau mal, was ich mit der Acrylmalerei gemalt habe! --- Acrylic Paint (Einfaches Fingermalen) - https://f-droid.org/app/anupam.acrylic Als Text teilen Ich kann keine App zum Teilen finden… - Pinsel + Pinsel Über Nochmal Zurück drücken um zu schließen!\n(Alles ungespeicherte geht verloren) Bild zum Öffnen wählen Farbe aus dem Bild holen Neue Farbe in Benutzung Klicke irgendwo hin, um die Farbe zu benutzen Das kann ich nicht, weil das Android zu alt ist und mindestens API-Version 17 dafür haben muss. Schmieren - \ No newline at end of file + diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 4243f74..7ac1f7c 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1,58 +1,58 @@ Acrylic Paint Acrylic Paint est un logiciel libre qui libère votre créativité !\n\nAppuie sur menu pour plus d\'options.\n\nMerci à Anupam Shrivastava pour l\'idée, à Valerio Bozzolan pour avoir ressuscité le projet et au physicien Marco Gagino pour le formidable soutien. Merci à tous les contributeurs !\n\nBonne peinture :) Voici ta toile. Commence à peindre ! Couleur Gras Flou Taille de brosse Effacer Effacer tout Enregistrer Partager À propos Taille sélectionnée : %1$d Taille de brosse Peinture sauvegardée sous %1$s Sélectionner Continuer OK Choisir une couleur Partager Regardez ce que j\'ai peint avec Acrylic Paint! --- Acrylic Paint (peinture simple avec le doigt) - https://f-droid.org/app/anupam.acrylic Partager comme du texte Impossible de trouver une application pour partager… - Crayon + Crayon À propos Appuie sur retour une nouvelle fois pour quitter !\n(en perdant tout le travail non enregistré) Acrylic Paint

Merci d\'utiliser Acrylic Paint!
Un logiciel libre pour libérer votre créativité !

Crédits

Un grand merci à :
Valerio Bozzolan pour le bon travail de relecture et d\'optimisation du code source. Il continue actuellement le travail pour cette version de AcrylicPaint.
Marco Gagino for le restylage complet et sa grande participation !

Licences

-

Cette version de Acrylic Paint et son code source sont fournis par Valerio Bozzolan sous +

Cette version de Acrylic Paint et son code source sont fournis par Valerio Bozzolan sous les termes de la licence GNU GPLv3+. Cette licence permet à tout monde d\'utiliser, étudier, améliorer et partager cette application par tous les moyens et pour tout usage tant que vous offrez les mêmes droits à vos utilisateurs.

-

Cette application est distribuée dans l\'espoir qu\'elle sera utile à tous, mais sans aucune garantie ; sans même la garantie implicite de +

Cette application est distribuée dans l\'espoir qu\'elle sera utile à tous, mais sans aucune garantie ; sans même la garantie implicite de COMMERCIALISATION ou D\'ADAPTATION A UN USAGE PARTICULIER. Voir la Licence Publique Générale GNU pour plus de détails.

Note

Si vous rencontrez des problèmes ou avez des idées, n\'hésitez pas à utiliser le bug tracker.

Contribuer au code source : valerio-bozzolan/AcrylicPaint @GitHub.

Lisez le fichier README pour plus d\'informations.

-

Amusez-vous bien !

+

Amusez-vous bien !

]]>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 84c0123..007003b 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1,63 +1,63 @@ Acrylic Paint è un software libero che libera la tua creatività!\n\nPremi il tasto menù per più opzioni.\n\nUn ringraziamento all\'autore originale Anupam Shrivastava, a Valerio Bozzolan per la riesumazione del progetto ed a Marco Gagino per il sostegno spaventoso. Grazie a tutti i contributori!\n\n…Divertiti! :) Qui c\'è la tua tela. Inizia a colorare! Colore Grassetto Sfocato Dimensione Gomma Pulisci tutto Salva Condividi Informazioni Apri immagine come sfondo Riempi sfondo Dimensione scelta: %1$d Scegli dimensione: La tua creazione è stata salvata in %1$s Seleziona Continua Scegli un Colore Condividi Guarda cosa ho dipinto con Acrylic Paint! --- Acrylic Paint (Simple finger painting) - https://f-droid.org/app/anupam.acrylic Condividi come testo Non risulta alcuna app con cui condividere la tua opera… - Matita + Matita Informazioni Premi ancora per uscire!\n(Hai salvato?) Acrylic Paint

Grazie per aver scelto Acrylic Paint!
Un software libero che libera la tua creatività!

Crediti

Ringraziamenti speciali a:
Valerio Bozzolan per l'intensa revisione al codice sorgente. È l'attuale manutentore di questa versione.
Marco Gagino per il profondo restyling e grande spirito di collaborazione!

Licenze

Questa versione di Acrylic Paint e il relativo codice sorgente sono distribuiti da Valerio Bozzolan sotto i termini della licenza GNU GPLv3+. Ciò è per permettere a chiunque di usare, studiare, migliorare e ricondividere quest\'app con qualunque mezzo e per qualsiasi scopo a patto di mantenere sempre questi diritti.

Quest\'applicazione è rilasciata nella speranza che sia utile a tutti, ma senza alcuna garanzia (nè garanzie di commerciabilità).

Note

Se ti accorgi di qualche difetto o se hai idee, usa il bug tracker.

Contribuisci al codice sorgente su valerio-bozzolan/AcrylicPaint @GitHub.

Leggi il file README per maggiori informazioni.

Divertiti!

]]>
Seleziona l\'immagine da aprire Preleva un colore Colore prelevato Premi ovunque per prelevare un colore Questa funzionalità è disabilitata poiché richiede una versione di Android più aggiornata (almeno API 17). Sfuma
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2d7290f..bb222b5 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,56 +1,56 @@ Acrylic Paint О программе Размытие Размер кисти Размер кисти Стереть всё Цвет Продолжить Жирный Стереть Вот ваш холст. Начните рисовать! Не удаётся найти приложение, чтобы поделиться с… - Карандаш + Карандаш Ок Выбрать цвет Нажмите кнопку НАЗАД снова, чтобы выйти из программы!\n(Несохранённая работа будет потеряна) Сохранить Ваша работа сохранена в %1$s Выбрать Поделиться Поделиться в виде текста Посмотрите на то, что я нарисовал с помощью Acrylic Paint! --- Acrylic Paint (Простое рисование пальцем) - https://f-droid.org/app/anupam.acrylic О программе Поделиться Выбранный размер: %1$d Acrylic Paint - это Свободное Программное Обеспечение, которое позволяет вам свободно творить!\n\nНажмите на меню для отображения других опций.\n\nБлагодарю Anupam Shrivastava за идею, Valerio Bozzolan за возрождение проекта и физика Marco Gagino за потрясающую поддержку. Спасибо всем участникам!\n\nСчастливого рисования :) Acrylic Paint

Спасибо за использование Acrylic Paint!
Свободное Программное Обеспечение, которое позволяет вам свободно творить!

Благодарности

Особая благодарность:
Valerio Bozzolan за большую работу, проделанную над исходным кодом и его оптимизацией. В настоящее время он продолжает работу над этой версией Acrylic Paint.
Marco Gagino за тщательный редизайн и за большое участие!

Лицензии

Эта версия Acrylic Paint и его исзодный код выпущен Valerio Bozzolan на условиях лицензии GNU GPLv3+. Дицензия даёт каждому право использовать, изучать, улучшать и делиться этим приложением любыми средствами и для любой цели до тех пор, пока предлагаете его на тех же условиях для остальных.

Приложение распространяется в надежде, что оно будет полезено для всех, но без каких-либо гарантий; в том числе без подразумеваемых гарантий КОММЕРЧЕСКОЙ ВЫГОДЫ или ПРИГОДНОСТИ ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ. Смотрите GNU General Public License для более подробной информации.

Примечание

Если вы заметили какие-либо проблемы или у вас есть некоторые идеи, не стесняйтесь использовать баг трекер.

Внести вклад в исходный код: valerio-bozzolan/AcrylicPaint @GitHub.

Прочтите README для получения дополнительной информации.

Удачи!

]]>
-
\ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 17e71d9..a6c9beb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,66 +1,66 @@ Acrylic Paint Acrylic Paint is a Free and Open Source Software that frees your creativity!\n\nPress menu for more options.\n\nThanks to Anupam Shrivastava for the idea, to Valerio Bozzolan for reviving the project and the physicist Marco Gagino for the terrific support. Thanks to all the contributors!\n\nHappy painting :) Here is your canvas. Start to paint! - Color - Bold + Color palette + Bold (emboss) Blur Brush size Erase Erase entire foreground Save Share About Open image as background Fill background with color Selected size: %1$d Brush size Saved your artwork to %1$s Select Continue OK - Pick a Color + Pick a color Share Look at what I painted with Acrylic Paint! --- Acrylic Paint (Simple finger painting) - https://f-droid.org/app/anupam.acrylic Share as text Can\'t locate an app to share with… - Pencil + Brush About Press back again to exit!\n(Losing all the unsaved work) Acrylic Paint

Thanks for using Acrylic Paint!
A Free and Open Source Software to free your creativity!

Credits

Special thanks to:
Valerio Bozzolan for the great work done reviewing the source code and optimising it. He currently carries on the work for this version of AcrylicPaint.
Marco Gagino for the thorough restyling and the great participation! -

+

Licenses

This version of Acrylic Paint and its source code are released by Valerio Bozzolan under the terms of the GNU GPLv3+ license. This license gives everyone the ability to use, study, better and share this app by any means and for every purpose as long as you offer these same rights to the others.

This app is distributed in the hope that it will be useful to everyone, but without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Note

If you notice any problem or if you have some ideas feel free to use the bug tracker.

Contribute to the source code: valerio-bozzolan/AcrylicPaint @GitHub.

Read the README file for further information.

-

Have fun!

+

Have fun!

]]>
Select image to open - Extract a color + Extract color (eyedropper) New color extracted Tap anywhere to extract a color That ability is disabled because it requires a newer Android version (at least API level 17). Smudge