diff options
41 files changed, 3025 insertions, 36 deletions
diff --git a/platform/android/example/app/src/main/AndroidManifest.xml b/platform/android/example/app/src/main/AndroidManifest.xml index bdd8e804..d88f9e01 100644 --- a/platform/android/example/app/src/main/AndroidManifest.xml +++ b/platform/android/example/app/src/main/AndroidManifest.xml @@ -39,7 +39,7 @@ </intent-filter> </activity> - <activity android:name=".DocViewActivity"> + <activity android:name=".DocViewActivity" android:configChanges="orientation|screenSize"> </activity> </application> diff --git a/platform/android/example/mupdf/src/main/AndroidManifest.xml b/platform/android/example/mupdf/src/main/AndroidManifest.xml index 4065d7fd..e38f7206 100644 --- a/platform/android/example/mupdf/src/main/AndroidManifest.xml +++ b/platform/android/example/mupdf/src/main/AndroidManifest.xml @@ -6,5 +6,10 @@ android:label="@string/app_name" android:supportsRtl="true" > + + <activity android:name="com.artifex.mupdf.android.ProofActivity" + android:configChanges="orientation|screenSize"> + </activity> + </application> </manifest> diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc Binary files differnew file mode 100755 index 00000000..61cb86a5 --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/CoatedFOGRA39.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc Binary files differnew file mode 100755 index 00000000..78e4bb3c --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/EuroscaleCoated.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc Binary files differnew file mode 100755 index 00000000..004b8b9d --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/JapanWebCoated.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc Binary files differnew file mode 100755 index 00000000..078a6443 --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/CMYK/USWebCoatedSWOP.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc Binary files differnew file mode 100755 index 00000000..a79f576b --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/RGB/AdobeRGB1998.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc Binary files differnew file mode 100755 index 00000000..1d99a710 --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/RGB/CIERGB.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc b/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc Binary files differnew file mode 100755 index 00000000..de37f3cd --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/RGB/WideGamutRGB.icc diff --git a/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm b/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm Binary files differnew file mode 100755 index 00000000..7f9d18d0 --- /dev/null +++ b/platform/android/example/mupdf/src/main/assets/profiles/RGB/sRGB Color Space Profile.icm diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java index 26624ab5..c305555b 100644 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java +++ b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocActivityView.java @@ -1,15 +1,19 @@ package com.artifex.mupdf.android; import android.app.Activity; +import android.app.Dialog; import android.content.Context; +import android.content.Intent; import android.graphics.Color; import android.graphics.PorterDuff; +import android.net.Uri; import android.util.AttributeSet; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewTreeObserver; +import android.view.Window; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; @@ -18,6 +22,7 @@ import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.RelativeLayout; +import android.widget.Spinner; import android.widget.TabHost; import android.widget.TextView; import android.widget.Toast; @@ -27,6 +32,12 @@ import com.artifex.mupdf.fitz.Link; import com.artifex.mupdf.fitz.Outline; import com.artifex.mupdf.fitz.R; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.UUID; + public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeListener, View.OnClickListener, DocView.SelectionChangeListener { private DocView mDocView; @@ -66,6 +77,8 @@ public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeL private ImageButton mLineColorButton; private ImageButton mLineThicknessButton; + private ImageButton mProofButton; + public DocActivityView(Context context) { super(context); @@ -341,6 +354,9 @@ public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeL mOpenInButton = (ImageButton)findViewById(R.id.open_in_button); mOpenInButton.setOnClickListener(this); + mProofButton = (ImageButton)findViewById(R.id.proof_button); + mProofButton.setOnClickListener(this); + // this listener will mSearchText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @@ -555,6 +571,10 @@ public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeL onLineColorButton(); if (v == mLineThicknessButton) onLineThicknessButton(); + + if (v == mProofButton) + onProof(); + } public void onSearchNextButton() @@ -746,6 +766,147 @@ public class DocActivityView extends FrameLayout implements TabHost.OnTabChangeL } } + private void onProof() + { + proofSetup(); + if (!proofSupported()) + { + Utilities.showMessage((Activity)getContext(), "gprf not supported", "gprf not supported"); + return; + } + + + + + + // show a dialog to collect the resolution and profiles + final Activity activity = (Activity)getContext(); + + final Dialog dialog = new Dialog(activity); + dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); + dialog.setContentView(R.layout.proof_dialog); + + final Spinner sp1 = (Spinner)(dialog.findViewById(R.id.print_profile_spinner)); + final Spinner sp2 = (Spinner)(dialog.findViewById(R.id.display_profile_spinner)); + final Spinner sp3 = (Spinner)(dialog.findViewById(R.id.resolution_spinner)); + + dialog.findViewById(R.id.cancel_button).setOnClickListener(new OnClickListener() + { + @Override + public void onClick(View v) + { + // Cancel + dialog.dismiss(); + } + }); + + dialog.findViewById(R.id.ok_button).setOnClickListener(new OnClickListener() + { + @Override + public void onClick(View v) + { + // OK + dialog.dismiss(); + doProof(sp1.getSelectedItemPosition(), sp2.getSelectedItemPosition(), sp3.getSelectedItemPosition()); + + } + }); + + dialog.show(); + } + + private static boolean proofSetupDone = false; + private static boolean proofCodeSupported = false; + private static boolean proofGsLibLoaded = false; + private static void proofSetup() + { + if (proofSetupDone) + return; + + proofCodeSupported = (com.artifex.mupdf.fitz.Context.gprfSupportedNative()==1); + + if (proofCodeSupported) + { + try + { + System.loadLibrary("gs"); + proofGsLibLoaded = true; + } + catch (UnsatisfiedLinkError e) + { + } + } + + proofSetupDone = true; + } + + private static boolean proofSupported() + { + return (proofCodeSupported && proofGsLibLoaded); + } + + private void doProof(int printProfileIndex, int displayProfileIndex, int resolutionIndex) + { + // get the resolution + String[] resolutions = getResources().getStringArray(R.array.proof_resolutions); + String resolutionString = resolutions[resolutionIndex]; + int resolution = Integer.parseInt(resolutionString); + + // get the print profile as a temp file + String[] printProfiles = getResources().getStringArray(R.array.proof_print_profile_files); + String printProfileFile = printProfiles[printProfileIndex]; + String printProfilePath = extractProfileAsset("profiles/CMYK/" + printProfileFile); + + // get the display profile as a temp file + String[] displayProfiles = getResources().getStringArray(R.array.proof_display_profile_files); + String displayProfileFile = displayProfiles[displayProfileIndex]; + String displayProfilePath = extractProfileAsset("profiles/RGB/" + displayProfileFile); + + // what page are we doing? + int thePage = mDocView.getMostVisiblePage(); + + String proofFile = mDocView.getDoc().makeProof(mDocView.getDoc().getPath(), printProfilePath, displayProfilePath, resolution); + + Uri uri = Uri.parse("file://" + proofFile); + Intent intent = new Intent((Activity)getContext(), ProofActivity.class); + intent.setAction(Intent.ACTION_VIEW); + intent.setData(uri); + // add the current page so it can be found when the activity is running + intent.putExtra("startingPage", thePage); + ((Activity)getContext()).startActivity(intent); + } + + private String extractProfileAsset(String profile) + { + try + { + InputStream inStream = getContext().getAssets().open(profile); + String tempfile = getContext().getExternalCacheDir() + "/shared/" + UUID.randomUUID() + ".profile"; + new File(tempfile).mkdirs(); + Utilities.deleteFile(tempfile); + + FileOutputStream outStream = new FileOutputStream(tempfile); + byte[] buffer = new byte[4096]; // To hold file contents + int bytes_read; // How many bytes in buffer + + // Read a chunk of bytes into the buffer, then write them out, + // looping until we reach the end of the file (when read() returns + // -1). Note the combination of assignment and comparison in this + // while loop. This is a common I/O programming idiom. + while ((bytes_read = inStream.read(buffer)) != -1) + // Read until EOF + outStream.write(buffer, 0, bytes_read); // write + + return tempfile; + } + catch (IOException e) + { + e.printStackTrace(); + } + + return ""; + } + private void onDeleteButton() { mDocView.onDelete(); diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java index 0bde1f03..f722da52 100755 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java +++ b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocPageView.java @@ -344,6 +344,11 @@ public class DocPageView extends View implements Callback new RenderTask().execute(params, null, null); } + public void stopRender() + { + // TODO ?? + } + private void cachePage() { Cookie cookie = new Cookie(); @@ -637,10 +642,13 @@ public class DocPageView extends View implements Callback private StructuredText.TextBlock blockContainingPoint(StructuredText.TextBlock blocks[], Point p) { - for (StructuredText.TextBlock block : blocks) + if (blocks != null) { - if (block.bbox.contains(p.x, p.y)) - return block; + for (StructuredText.TextBlock block : blocks) + { + if (block.bbox.contains(p.x, p.y)) + return block; + } } return null; @@ -648,10 +656,13 @@ public class DocPageView extends View implements Callback private StructuredText.TextLine lineContainingPoint(StructuredText.TextLine lines[], Point p) { - for (StructuredText.TextLine line : lines) + if (lines != null) { - if (line.bbox.contains(p.x, p.y)) - return line; + for (StructuredText.TextLine line : lines) + { + if (line.bbox.contains(p.x, p.y)) + return line; + } } return null; @@ -659,10 +670,13 @@ public class DocPageView extends View implements Callback private StructuredText.TextSpan spanContainingPoint(StructuredText.TextSpan spans[], Point p) { - for (StructuredText.TextSpan span : spans) + if (spans != null) { - if (span.bbox.contains(p.x, p.y)) - return span; + for (StructuredText.TextSpan span : spans) + { + if (span.bbox.contains(p.x, p.y)) + return span; + } } return null; @@ -670,10 +684,13 @@ public class DocPageView extends View implements Callback private StructuredText.TextChar charContainingPoint(StructuredText.TextChar chars[], Point p) { - for (StructuredText.TextChar tchar : chars) + if (chars != null) { - if (tchar.bbox.contains(p.x, p.y)) - return tchar; + for (StructuredText.TextChar tchar : chars) + { + if (tchar.bbox.contains(p.x, p.y)) + return tchar; + } } return null; diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java new file mode 100644 index 00000000..258af1f7 --- /dev/null +++ b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocProofView.java @@ -0,0 +1,116 @@ +package com.artifex.mupdf.android; + +import android.app.Activity; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; + +public class DocProofView extends DocViewBase +{ + public DocProofView(Context context) + { + super(context); + initialize(context); + } + + public DocProofView(Context context, AttributeSet attrs) + { + super(context, attrs); + initialize(context); + } + + public DocProofView(Context context, AttributeSet attrs, int defStyle) + { + super(context, attrs, defStyle); + initialize(context); + } + + private void initialize(Context context) + { + } + + @Override + protected void onLayout(boolean changed, int left, int top, int right, int bottom) + { + super.onLayout(changed, left, top, right, bottom); + + // not if we've been finished + if (finished()) + return; + + // see if we've been given a start page + handleStartPage(); + } + + @Override + public void handleStartPage() + { + // if we've been given a start page, go there. + if (getStartPage()>0) + { + setCurrentPage(getStartPage()-1); + setStartPage(0); // but only once + } + } + + private int mCurrentPage = 0; + public int getCurrentPage() {return mCurrentPage;} + + public void setCurrentPage(int pageNum) + { + if (pageNum != mCurrentPage) + { + // stop rendering the current page + DocPageView pv = (DocPageView)getOrCreateChild(0); + pv.stopRender(); + + mCurrentPage = pageNum; + + // when the page changes, reset what's in view. + clearChildViews(); + removeAllViewsInLayout(); + + // scroll to 0,0 and do a new layout. +// smoothScrollBy(getScrollX(),getScrollY()); + requestLayout(); + } + } + + @Override + protected int getPageCount() + { + int count = super.getPageCount(); + if (count==0) + return 0; // no pages yet + + // always return one page + return 1; + } + + @Override + protected View getViewFromAdapter(int index) + { + // only one view at a time, so we're not going to use the adapter + // we'll just create and reuse a single view + if (mDocPageView==null) { + final Activity activity = (Activity) mContext; + mDocPageView = new DocPageView(activity, getDoc()); + } + + mDocPageView.setupPage(mCurrentPage, getWidth(), 1); + return mDocPageView; + } + + private DocPageView mDocPageView = null; + + @Override + protected void doSingleTap(float fx, float fy) + { + } + + @Override + public boolean shouldAdjustScaleEnd() + { + return false; + } +} diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java index 6152851c..5ecc75d8 100755 --- a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java +++ b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/DocViewBase.java @@ -44,7 +44,7 @@ public class DocViewBase // bitmaps for rendering // these are created by the activity and set using setBitmaps() - private final static double OVERSIZE_FACTOR = 1.4; + private final static double OVERSIZE_FACTOR = 1.0; private final Bitmap[] bitmaps = {null, null}; private int bitmapIndex = 0; @@ -446,34 +446,42 @@ public class DocViewBase return true; } + public boolean shouldAdjustScaleEnd() + { + return true; + } + public void onScaleEnd(ScaleGestureDetector detector) { - // When a pinch-scale is done, we want to get n-across - // to fit properly. + if (shouldAdjustScaleEnd()) + { + // When a pinch-scale is done, we want to get n-across + // to fit properly. - // get current viewport - Rect viewport = new Rect(); - getGlobalVisibleRect(viewport); + // get current viewport + Rect viewport = new Rect(); + getGlobalVisibleRect(viewport); - // if we're at one column and wider than the viewport, - // leave it alone. - if (mLastLayoutColumns == 0 && mPageCollectionWidth >= viewport.width()) - { - mScaling = false; - return; - } + // if we're at one column and wider than the viewport, + // leave it alone. + if (mLastLayoutColumns == 0 && mPageCollectionWidth >= viewport.width()) + { + mScaling = false; + return; + } - // ratio of the viewport width to layout width - float ratio = ((float) (viewport.width())) / ((float) (mPageCollectionWidth)); + // ratio of the viewport width to layout width + float ratio = ((float) (viewport.width())) / ((float) (mPageCollectionWidth)); - // set a new scale factor - mScale *= ratio; - scaleChildren(); + // set a new scale factor + mScale *= ratio; + scaleChildren(); - // scroll so the left edged is flush to the viewport. - mXScroll += getScrollX(); + // scroll so the left edged is flush to the viewport. + mXScroll += getScrollX(); - requestLayout(); + requestLayout(); + } mScaling = false; } @@ -509,7 +517,6 @@ public class DocViewBase protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - super.onLayout(changed, left, top, right, bottom); if (!mStarted) @@ -795,6 +802,11 @@ public class DocViewBase return v; } + protected void clearChildViews() + { + mChildViews.clear(); + } + protected View getViewFromAdapter(int index) { return getAdapter().getView(index, getCached(), this); @@ -868,6 +880,10 @@ public class DocViewBase // been requested, start it now renderPages(); } + else { + if (mIdleRenderListener != null) + mIdleRenderListener.onIdle(); + } } } }, mShowAnnotations); @@ -1023,4 +1039,12 @@ public class DocViewBase onSizeChange((float) (page_width_percentage + pagelist_width_percentage) / (float) (page_width_percentage)); } + private IdleRenderListener mIdleRenderListener = null; + public void setIdleRenderListener(IdleRenderListener l) {mIdleRenderListener=l;} + + public interface IdleRenderListener + { + public void onIdle(); + } + } diff --git a/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java new file mode 100644 index 00000000..0d11f063 --- /dev/null +++ b/platform/android/example/mupdf/src/main/java/com/artifex/mupdf/android/ProofActivity.java @@ -0,0 +1,430 @@ +package com.artifex.mupdf.android; + + +import android.app.Activity; +import android.app.ProgressDialog; +import android.content.Context; +import android.graphics.drawable.ColorDrawable; +import android.net.Uri; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.WindowManager; +import android.view.animation.Animation; +import android.view.animation.TranslateAnimation; +import android.widget.Adapter; +import android.widget.BaseAdapter; +import android.widget.Button; +import android.widget.CheckBox; +import android.widget.CompoundButton; +import android.widget.FrameLayout; +import android.widget.ImageButton; +import android.widget.ListView; +import android.widget.TextView; + +import com.artifex.mupdf.fitz.Document; +import com.artifex.mupdf.fitz.Page; +import com.artifex.mupdf.fitz.R; +import com.artifex.mupdf.fitz.Separation; + +import java.util.LinkedList; + +public class ProofActivity extends Activity implements View.OnClickListener, DocViewBase.IdleRenderListener +{ + private DocProofView mDocView; + private Document mDoc=null; + private String mPath; + + private ToolbarButton mFirstPageButton; + private ToolbarButton mPreviousPageButton; + private ToolbarButton mNextPageButton; + private ToolbarButton mLastPageButton; + private ToolbarButton mColorsUpButton; + private ToolbarButton mColorsDownButton; + private ImageButton mBackButton; + private Button mApplyButton; + + @Override + protected void onCreate(Bundle savedInstanceState) + { + super.onCreate(savedInstanceState); + + // get the file path + Uri uri = getIntent().getData(); + final String path = Uri.decode(uri.getEncodedPath()); + mPath = path; + + // get the starting page + int startPage = getIntent().getIntExtra("startingPage", 0); + + // set up UI + setContentView(R.layout.activity_proof_view); + mDocView = (DocProofView) findViewById(R.id.proof_view); + + mFirstPageButton = (ToolbarButton)findViewById(R.id.proof_first_page); + mFirstPageButton.setOnClickListener(this); + + mPreviousPageButton = (ToolbarButton)findViewById(R.id.proof_previous_page); + mPreviousPageButton.setOnClickListener(this); + + mNextPageButton = (ToolbarButton)findViewById(R.id.proof_next_page); + mNextPageButton.setOnClickListener(this); + + mLastPageButton = (ToolbarButton)findViewById(R.id.proof_last_page); + mLastPageButton.setOnClickListener(this); + + mBackButton = (ImageButton) findViewById(R.id.proof_back_button); + mBackButton.setOnClickListener(this); + + mColorsUpButton = (ToolbarButton) findViewById(R.id.proof_colors_button_up); + mColorsUpButton.setOnClickListener(this); + + mColorsDownButton = (ToolbarButton) findViewById(R.id.proof_colors_button_down); + mColorsDownButton.setOnClickListener(this); + + mApplyButton = (Button) findViewById(R.id.proof_apply_button); + mApplyButton.setOnClickListener(this); + + // wait for layout to open the document + final ProofActivity activity = this; + mDocView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + public void onGlobalLayout() { + mDocView.getViewTreeObserver().removeOnGlobalLayoutListener(this); + + spinner = createAndShowWaitSpinner(activity); + + // Go! + mWaitingForIdle = true; + mDoc = new Document(path); + mDocView.start(mDoc); + mDocView.setIdleRenderListener(activity); + } + }); + } + + private ProgressDialog spinner = null; + + @Override + public void finish() + { + // stop the view + mDocView.finish(); + + // delete the .gproof file + Utilities.deleteFile(mPath); + + super.finish(); + } + + @Override + public void onClick(View v) + { + int pageCount = mDocView.getDoc().countPages(); // the real page count + int currentPage = mDocView.getCurrentPage(); + + if (v == mFirstPageButton) + { + if (currentPage != 0) + gotoPage(v, 0); + } + else if (v == mPreviousPageButton) + { + if (currentPage>0) + gotoPage(v, currentPage-1); + } + else if (v == mNextPageButton) + { + if (currentPage+1<pageCount) + gotoPage(v, currentPage+1); + } + else if (v == mLastPageButton) + { + if (currentPage != pageCount-1) + gotoPage(v, pageCount-1); + } + else if (v == mBackButton) + { + finish(); + } + else if (v == mColorsUpButton || v == mColorsDownButton ) + { + onColorsButton(); + } + else if (v == mApplyButton) + { + updateColors(); + } + } + + + private int colorsWidth = -1; + private void onColorsButton() + { + // toggle the colors panel + final View v = findViewById(R.id.proof_color_host); + int vis = v.getVisibility(); + if (colorsWidth ==-1) + colorsWidth = v.getWidth(); + + if (vis == View.VISIBLE) + { + mColorsDownButton.setVisibility(View.GONE); + mColorsUpButton.setVisibility(View.VISIBLE); + + Animation anim = new TranslateAnimation(0, colorsWidth, 0, 0); + anim.setDuration(350); + anim.setAnimationListener(new Animation.AnimationListener() { + public void onAnimationStart(Animation animation) { + v.setVisibility(View.INVISIBLE); + } + public void onAnimationRepeat(Animation animation) {} + public void onAnimationEnd(Animation animation) {} + }); + v.startAnimation(anim); + } + else + { + mColorsDownButton.setVisibility(View.VISIBLE); + mColorsUpButton.setVisibility(View.GONE); + + Animation anim = new TranslateAnimation(colorsWidth, 0, 0, 0); + anim.setDuration(350); + anim.setAnimationListener(new Animation.AnimationListener() { + public void onAnimationStart(Animation animation) { + v.setVisibility(View.VISIBLE); + } + public void onAnimationRepeat(Animation animation) {} + public void onAnimationEnd(Animation animation) {} + }); + v.startAnimation(anim); + } + } + + private void gotoPage(View v, final int pageNum) + { + spinner = createAndShowWaitSpinner(this); + mWaitingForIdle = true; + v.post(new Runnable() { + @Override + public void run() { + mDocView.setCurrentPage(pageNum); + } + }); + } + + private void setPageLabel() + { + int page = mDocView.getCurrentPage()+1; + int count = mDocView.getDoc().countPages(); + String s = String.format("Page %d of %d", page, count); + TextView tv = (TextView) findViewById(R.id.proof_page_n_of_n); + tv.setText(s); + } + + private boolean mWaitingForIdle = false; + private boolean mWaitingForSpinner = false; + private ListView mColorList = null; + private ChooseColorAdapter mColorAdapter = null; + + @Override + public void onIdle() + { + // called when page rendering has become idle + + if (mWaitingForSpinner) + { + spinner.dismiss(); + mWaitingForSpinner = false; + } + + if (mWaitingForIdle) + { + spinner.dismiss(); + setPageLabel(); + + // get the current page + DocPageView dpv = (DocPageView)mDocView.getViewFromAdapter(mDocView.getCurrentPage()); + Page page = dpv.getPage(); + + // count the separations + int numSeparations = page.countSeparations(); + + // set up the list + mColorList = (ListView)findViewById(R.id.proof_color_list); + mColorAdapter = new ChooseColorAdapter(getLayoutInflater()); + mColorList.setAdapter(mColorAdapter); + + // get each one + for (int i=0; i<numSeparations; i++) + { + // get it + Separation sep = page.getSeparation(i); + String name = sep.name; + + // transform to a color that can be used to colorize icons + int alpha = (sep.rgba >> 24) & 0xFF; + int red = (sep.rgba >> 16) & 0xFF; + int green = (sep.rgba >> 8 ) & 0xFF; + int blue = (sep.rgba >> 0 ) & 0xFF; + int color = (alpha << 24) | (red << 16) | (green << 8) | (blue << 0); + + mColorAdapter.add(new ChooseColorItem(sep.name, color, true, sep)); + } + + mColorList.getLayoutParams().width = getWidestView(getBaseContext(), mColorAdapter); + + } + mWaitingForIdle = false; + } + + public void updateColors() + { + // get the current page + DocPageView dpv = (DocPageView)mDocView.getViewFromAdapter(mDocView.getCurrentPage()); + Page page = dpv.getPage(); + + int numSeparations = mColorAdapter.getCount(); + for (int i=0; i<numSeparations; i++) + { + ChooseColorItem item = (ChooseColorItem)mColorAdapter.getItem(i); + Separation sep = item.separation; + boolean checked = item.checked; + String name = item.name; + + page.enableSeparation(i, checked); + } + + spinner = createAndShowWaitSpinner(this); + mWaitingForSpinner = true; + mDocView.triggerRender(); + } + + private static int getWidestView(Context context, Adapter adapter) + { + int maxWidth = 0; + View view = null; + FrameLayout fakeParent = new FrameLayout(context); + for (int i=0, count=adapter.getCount(); i<count; i++) { + view = adapter.getView(i, view, fakeParent); + view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); + int width = view.getMeasuredWidth(); + if (width > maxWidth) { + maxWidth = width; + } + } + return maxWidth; + } + + private static ProgressDialog createAndShowWaitSpinner(Context mContext) + { + ProgressDialog dialog = new ProgressDialog(mContext); + try { + dialog.show(); + } + catch (WindowManager.BadTokenException e) { + } + dialog.setCancelable(false); + dialog.setIndeterminate(true); + dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); + dialog.setContentView(R.layout.wait_spinner); + return dialog; + } + + //--------------------------------------------------------------------------------------------------------- + + public class ChooseColorItem + { + public String name; + public int color; + public boolean checked; + Separation separation; + + public ChooseColorItem(String name, int color, boolean checked, Separation separation) + { + this.checked = checked; + this.name = name; + this.color = color; + this.separation = separation; + } + } + + //--------------------------------------------------------------------------------------------------------- + + public class ChooseColorAdapter extends BaseAdapter + { + private final LinkedList<ChooseColorItem> mItems; + private final LayoutInflater mInflater; + + public ChooseColorAdapter(LayoutInflater inflater) + { + mInflater = inflater; + mItems = new LinkedList<>(); + } + + public void clear() + { + mItems.clear(); + } + + public void add(ChooseColorItem item) + { + mItems.add(item); + notifyDataSetChanged(); + } + + public int getCount() + { + return mItems.size(); + } + + public Object getItem(int i) + { + return mItems.get(i); + } + + public long getItemId(int arg0) + { + return 0; + } + + public View getView(int position, View convertView, ViewGroup parent) + { + View v; + if (convertView == null) + { + v = mInflater.inflate(R.layout.proof_color_list_entry, null); + } + else + { + v = convertView; + } + + final ChooseColorItem item = mItems.get(position); + + v.setTag(item); + + View swatch = v.findViewById(R.id.proof_entry_color_swatch); + swatch.setBackgroundColor(item.color); + + ((CheckBox) v.findViewById(R.id.proof_entry_checkbox)).setChecked(item.checked); + + ((CheckBox) v.findViewById(R.id.proof_entry_checkbox)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() + { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) + { + item.checked = isChecked; + } + }); + + ((TextView) v.findViewById(R.id.proof_entry_label)).setText(item.name); + + return v; + } + + } + + +} diff --git a/platform/android/example/mupdf/src/main/res/activity_doc_view.xml b/platform/android/example/mupdf/src/main/res/activity_doc_view.xml new file mode 100755 index 00000000..00065cf6 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/activity_doc_view.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <com.artifex.mupdf.android.DocActivityView + android:id="@+id/doc_view" + android:layout_width="match_parent" + android:layout_height="match_parent"> + </com.artifex.mupdf.android.DocActivityView> + +</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/drawable/color_box.xml b/platform/android/example/mupdf/src/main/res/drawable/color_box.xml new file mode 100644 index 00000000..c8b47a52 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/color_box.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <stroke android:width="1dp" android:color="#ff000000" /> + <solid android:color="#ffffffff" /> +</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml new file mode 100755 index 00000000..3fe059c0 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/icon_next_page.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="50" + android:viewportHeight="50"> + + <path + android:fillColor="#333333" + android:pathData="M30.001,9.334 L37.809,17.126 L37.809,40.664 L12.191,40.664 L12.191,9.334 +L30.001,9.334 Z M30.418,8.326 L11.182,8.326 L11.182,41.674 L38.818,41.674 +L38.818,16.708 L30.418,8.326 Z" /> + <path + android:strokeColor="#333333" + android:strokeWidth="1.034" + android:pathData="M29.965,8.911 L29.965,16.931 L37.957,16.931" /> + <path + android:strokeColor="#333333" + android:strokeWidth="0.61563909" + android:pathData="M15.0721,27.4841 L29.6391,27.3044" /> + <path + android:fillColor="#333333" + android:pathData="M28.9723,30.1418 L29.1012,23.8921 L33.1609,27.1026 Z" /> +</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml new file mode 100755 index 00000000..3e6b01ce --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/icon_prev_page.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="50" + android:viewportHeight="50"> + + <path + android:fillColor="#333333" + android:pathData="M30.001,9.334 L37.809,17.126 L37.809,40.664 L12.191,40.664 L12.191,9.334 +L30.001,9.334 Z M30.418,8.326 L11.182,8.326 L11.182,41.674 L38.818,41.674 +L38.818,16.708 L30.418,8.326 Z" /> + <path + android:strokeColor="#333333" + android:strokeWidth="1.034" + android:pathData="M29.965,8.911 L29.965,16.931 L37.957,16.931" /> + <path + android:strokeColor="#333333" + android:strokeWidth="0.61563909" + android:pathData="M33.1595,26.8018 L18.5914,26.7872" /> + <path + android:fillColor="#333333" + android:pathData="M19.0837,30.2063 L15.0672,26.9421 L19.296,23.9589 Z" /> +</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml new file mode 100644 index 00000000..fb38e07a --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/icon_proof.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="50" + android:viewportHeight="50"> + + <path + android:strokeColor="#333333" + android:strokeWidth="1.768" + android:pathData="M35.25,27.5 C35.25,34.68,30.661,38.5,25,38.5 S14.75,34.68,14.75,27.5 +S25,11.5,25,11.5 S35.25,20.32,35.25,27.5 Z" /> + <path + android:strokeColor="#333333" + android:strokeWidth="1.768" + android:strokeLineCap="round" + android:pathData="M18.167,26.001 C18.167,26.001,17.412,29.521,18.917,31.5 +C20.438,33.5,22.375,33.75,22.375,33.75" /> +</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml new file mode 100755 index 00000000..78e38809 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_down.xml @@ -0,0 +1,648 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="50" + android:viewportHeight="50"> + + <path + android:pathData="M15.771,20.94 L15.775,20.94 L15.775,20.941 L15.771,20.941 L15.771,20.94 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M21.48,19.821 C21.576,19.832,21.672,19.849,21.766,19.864 +C21.671,19.85,21.576,19.833,21.48,19.821 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M17.847,20.089 C17.92,20.068,17.994,20.051,18.066,20.033 +C17.993,20.051,17.92,20.068,17.847,20.089 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M18.933,19.86 C19.026,19.845,19.118,19.829,19.211,19.818 +C19.118,19.829,19.026,19.846,18.933,19.86 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M22.663,20.048 C22.73,20.065,22.799,20.081,22.866,20.099 +C22.799,20.081,22.73,20.064,22.663,20.048 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M30.82,19.822 C30.91,19.833,30.998,19.849,31.088,19.863 +C30.998,19.85,30.91,19.833,30.82,19.822 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M32.039,20.06 C32.086,20.073,32.139,20.083,32.185,20.097 +C32.139,20.083,32.086,20.072,32.039,20.06 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M28.027,19.895 C28.099,19.882,28.172,19.873,28.242,19.862 +C28.172,19.874,28.1,19.882,28.027,19.895 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M26.605,20.266 C26.628,20.258,26.652,20.248,26.675,20.241 +C26.652,20.248,26.629,20.258,26.605,20.266 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M15.778,20.938 L15.775,20.939 L15.775,20.939 Z" /> + <path + android:fillColor="#ED2427" + android:pathData="M17.847,20.089 C17.92,20.068,17.993,20.051,18.066,20.033 +C18.351,19.961,18.638,19.904,18.933,19.86 +C19.026,19.845,19.118,19.829,19.211,19.818 +C19.581,19.773,19.954,19.743,20.335,19.743 +C20.724,19.743,21.105,19.774,21.481,19.821 +C21.577,19.833,21.671,19.849,21.767,19.864 +C22.072,19.911,22.371,19.971,22.663,20.048 +C22.73,20.065,22.799,20.081,22.866,20.099 C23.621,20.311,24.336,20.616,24.999,21 +C25.507,20.707,26.043,20.461,26.606,20.266 +C26.629,20.258,26.653,20.248,26.676,20.241 +C27.112,20.094,27.565,19.978,28.028,19.895 +C28.1,19.882,28.173,19.874,28.243,19.862 +C28.708,19.792,29.179,19.744,29.663,19.744 +C30.056,19.744,30.44,19.775,30.821,19.823 +C30.911,19.834,30.999,19.85,31.089,19.864 +C31.411,19.913,31.73,19.978,32.04,20.06 +C32.087,20.073,32.14,20.083,32.186,20.097 +C32.956,20.313,33.684,20.624,34.358,21.019 +C34.358,21.018,34.358,21.016,34.358,21.015 +C34.358,15.911,30.198,11.773,25.064,11.773 +C19.96,11.773,15.817,15.87,15.776,20.94 +C15.776,20.939,15.777,20.939,15.779,20.939 +C16.423,20.574,17.118,20.29,17.847,20.089 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.275,22.189 C34.263,22.276,34.248,22.36,34.234,22.446 +C34.248,22.36,34.264,22.276,34.275,22.189 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M30.658,28.384 C30.644,28.394,30.629,28.405,30.613,28.415 +C30.629,28.405,30.645,28.394,30.658,28.384 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.045,23.362 C34.024,23.435,34.008,23.51,33.986,23.584 +C34.008,23.511,34.023,23.436,34.045,23.362 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M32.383,26.698 C32.373,26.713,32.362,26.726,32.352,26.739 +C32.361,26.727,32.373,26.711,32.383,26.698 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M33.084,25.667 C33.055,25.719,33.022,25.771,32.99,25.822 +C33.021,25.771,33.055,25.719,33.084,25.667 Z" /> + <path + android:fillColor="#3A54A4" + android:pathData="M34.357,21.019 C34.357,21.416,34.324,21.806,34.275,22.19 +C34.263,22.277,34.248,22.361,34.234,22.447 +C34.187,22.759,34.123,23.064,34.045,23.363 +C34.024,23.436,34.008,23.511,33.986,23.585 +C33.771,24.322,33.466,25.019,33.084,25.668 +C33.055,25.72,33.022,25.772,32.99,25.823 +C32.804,26.127,32.601,26.419,32.383,26.699 +C32.373,26.712,32.362,26.727,32.352,26.74 +C31.86,27.358,31.29,27.908,30.659,28.385 +C30.645,28.395,30.63,28.406,30.614,28.416 C30.3,28.65,29.973,28.869,29.63,29.062 +C29.626,29.453,29.593,29.837,29.542,30.218 +C29.532,30.284,29.521,30.351,29.511,30.419 +C29.456,30.757,29.388,31.087,29.298,31.409 +C29.288,31.454,29.278,31.497,29.265,31.538 +C29.05,32.284,28.742,32.989,28.357,33.645 +C28.337,33.678,28.316,33.709,28.296,33.743 +C28.107,34.054,27.903,34.352,27.681,34.636 +C27.671,34.65,27.663,34.661,27.654,34.671 +C27.174,35.284,26.615,35.831,25.997,36.306 +C25.987,36.314,25.976,36.32,25.968,36.327 +C25.66,36.559,25.338,36.776,25.002,36.97 +C25.002,36.972,25.002,36.972,25.001,36.972 +C26.372,37.765,27.963,38.228,29.665,38.228 +C34.802,38.228,38.96,34.089,38.96,28.984 +C38.957,25.588,37.107,22.625,34.357,21.019 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M25.961,21.642 C25.979,21.655,25.997,21.667,26.013,21.681 +C25.998,21.667,25.979,21.654,25.961,21.642 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.508,27.532 C29.524,27.638,29.543,27.742,29.555,27.85 +C29.543,27.742,29.523,27.639,29.508,27.532 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M31.088,19.863 C31.41,19.913,31.729,19.977,32.039,20.059 +C31.729,19.978,31.41,19.912,31.088,19.863 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.662,19.743 C30.055,19.743,30.439,19.774,30.82,19.822 +C30.439,19.774,30.055,19.743,29.662,19.743 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M27.645,23.287 C27.678,23.33,27.709,23.374,27.743,23.417 +C27.709,23.374,27.678,23.33,27.645,23.287 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.262,26.418 C29.289,26.515,29.311,26.613,29.336,26.71 +C29.311,26.613,29.289,26.515,29.262,26.418 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M28.279,24.202 C28.316,24.264,28.355,24.328,28.394,24.391 +C28.355,24.328,28.316,24.265,28.279,24.202 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.662,19.743 C29.178,19.743,28.707,19.791,28.242,19.861 +C28.705,19.791,29.178,19.743,29.662,19.743 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.355,21.02 C34.355,21.416,34.324,21.806,34.275,22.19 +C34.324,21.806,34.357,21.417,34.357,21.019 +C33.683,20.624,32.955,20.313,32.185,20.097 +C32.953,20.314,33.682,20.627,34.355,21.02 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M32.99,25.822 C32.804,26.126,32.601,26.42,32.383,26.698 +C32.602,26.418,32.805,26.126,32.99,25.822 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M33.986,23.584 C33.771,24.321,33.466,25.02,33.084,25.667 +C33.467,25.018,33.771,24.321,33.986,23.584 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.629,29.056 C29.629,29.058,29.629,29.058,29.629,29.062 +C29.973,28.869,30.299,28.65,30.613,28.416 +C30.301,28.647,29.973,28.862,29.629,29.056 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M26.676,20.24 C27.112,20.092,27.565,19.978,28.028,19.894 +C27.564,19.978,27.111,20.093,26.676,20.24 Z" /> + <path + android:fillColor="#B9529E" + android:pathData="M32.186,20.097 C32.139,20.083,32.086,20.073,32.04,20.06 +C31.729,19.978,31.411,19.914,31.089,19.864 +C30.999,19.85,30.911,19.834,30.821,19.823 +C30.44,19.775,30.055,19.744,29.663,19.744 +C29.179,19.744,28.706,19.792,28.243,19.862 +C28.173,19.873,28.1,19.883,28.028,19.895 +C27.565,19.979,27.112,20.092,26.676,20.241 +C26.653,20.249,26.629,20.259,26.606,20.266 +C26.047,20.462,25.524,20.721,25.022,21.013 +C25.349,21.204,25.663,21.413,25.962,21.642 +C25.98,21.655,25.998,21.667,26.014,21.681 +C26.621,22.148,27.17,22.687,27.645,23.287 +C27.678,23.33,27.709,23.374,27.743,23.417 +C27.934,23.669,28.112,23.931,28.28,24.202 +C28.317,24.264,28.356,24.328,28.395,24.391 +C28.76,25.024,29.053,25.702,29.262,26.417 +C29.289,26.514,29.311,26.612,29.336,26.709 +C29.404,26.979,29.461,27.252,29.508,27.531 +C29.524,27.637,29.543,27.741,29.555,27.849 +C29.602,28.221,29.633,28.599,29.633,28.982 +C29.633,29.007,29.629,29.029,29.629,29.054 +C29.973,28.861,30.301,28.646,30.613,28.413 +C30.629,28.403,30.644,28.392,30.658,28.382 +C31.289,27.905,31.859,27.355,32.351,26.737 +C32.361,26.724,32.372,26.711,32.382,26.696 +C32.601,26.418,32.804,26.124,32.989,25.82 +C33.02,25.768,33.053,25.716,33.083,25.665 +C33.466,25.018,33.771,24.319,33.985,23.582 +C34.006,23.509,34.022,23.434,34.044,23.36 +C34.122,23.061,34.187,22.755,34.233,22.444 +C34.247,22.358,34.262,22.274,34.274,22.187 +C34.323,21.803,34.354,21.414,34.354,21.017 +C33.682,20.627,32.953,20.314,32.186,20.097 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M30.658,28.384 C31.289,27.907,31.859,27.358,32.351,26.739 +C31.859,27.356,31.289,27.907,30.658,28.384 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.234,22.446 C34.187,22.757,34.123,23.063,34.045,23.362 +C34.123,23.063,34.188,22.759,34.234,22.446 Z" /> + <path + android:fillColor="#594098" + android:pathData="M16.141,23.576 C16.112,23.479,16.09,23.381,16.066,23.282 +C16.089,23.381,16.112,23.479,16.141,23.576 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.775,20.939 C15.774,20.939,15.773,20.941,15.771,20.942 L15.771,21.014 +C15.771,20.989,15.775,20.964,15.775,20.939 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.741,26.69 C17.712,26.654,17.683,26.615,17.656,26.578 +C17.685,26.615,17.712,26.654,17.741,26.69 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.109,25.774 C17.073,25.717,17.036,25.661,17.004,25.602 +C17.038,25.661,17.074,25.718,17.109,25.774 Z" /> + <path + android:fillColor="#6ABC45" + android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 +C23.371,35.817,22.824,35.278,22.351,34.677 +C22.323,34.642,22.296,34.605,22.268,34.566 +C22.069,34.308,21.886,34.039,21.717,33.757 +C21.681,33.7,21.645,33.646,21.613,33.587 C21.243,32.95,20.95,32.269,20.741,31.55 +C20.714,31.456,20.693,31.362,20.669,31.267 +C20.599,30.994,20.543,30.72,20.498,30.439 +C20.48,30.332,20.462,30.228,20.449,30.121 +C20.404,29.748,20.372,29.373,20.372,28.984 L20.372,28.982 +C19.356,28.39,18.465,27.611,17.742,26.691 +C17.713,26.655,17.686,26.616,17.657,26.579 +C17.46,26.32,17.279,26.053,17.111,25.775 +C17.075,25.718,17.04,25.662,17.006,25.603 +C16.64,24.97,16.349,24.292,16.142,23.577 +C16.113,23.48,16.091,23.382,16.067,23.283 +C15.998,23.014,15.942,22.744,15.899,22.468 +C15.881,22.361,15.863,22.256,15.849,22.147 +C15.804,21.776,15.773,21.4,15.773,21.016 L15.773,20.944 +C12.953,22.531,11.044,25.537,11.044,28.985 +C11.044,34.09,15.209,38.229,20.336,38.229 +C22.038,38.229,23.627,37.768,24.999,36.973 +C24.984,36.965,24.972,36.953,24.957,36.946 +C24.64,36.761,24.339,36.558,24.05,36.341 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.897,22.467 C15.879,22.361,15.86,22.253,15.847,22.146 +C15.861,22.255,15.879,22.359,15.897,22.467 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.715,24.216 C21.682,24.271,21.648,24.323,21.615,24.38 +C21.647,24.323,21.682,24.271,21.715,24.216 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.35,23.296 C22.324,23.328,22.301,23.362,22.275,23.397 +C22.3,23.362,22.324,23.328,22.35,23.296 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.024,21.651 C24.015,21.658,24.006,21.665,23.997,21.672 +C24.006,21.665,24.015,21.658,24.024,21.651 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.999,21 C24.336,20.615,23.622,20.311,22.866,20.099 +C23.619,20.313,24.336,20.615,24.999,21 C24.999,21.001,24.999,21.001,24.999,21 Z" /> + <path + android:fillColor="#594098" + android:pathData="M16.065,23.282 C15.996,23.015,15.94,22.743,15.897,22.467 +C15.94,22.743,15.997,23.014,16.065,23.282 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.656,26.578 C17.459,26.32,17.278,26.052,17.11,25.774 +C17.278,26.052,17.458,26.319,17.656,26.578 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.004,25.603 C16.638,24.972,16.348,24.291,16.14,23.577 +C16.347,24.292,16.639,24.97,17.004,25.603 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.778,20.938 C16.424,20.576,17.119,20.292,17.847,20.088 +C17.118,20.29,16.423,20.574,15.778,20.938 Z" /> + <path + android:fillColor="#594098" + android:pathData="M19.211,19.818 C19.581,19.771,19.953,19.743,20.335,19.743 +C19.954,19.743,19.581,19.773,19.211,19.818 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.741,26.69 C18.464,27.61,19.355,28.389,20.371,28.981 L20.371,28.979 +C19.353,28.39,18.463,27.607,17.741,26.69 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.767,19.864 C22.071,19.912,22.371,19.971,22.663,20.048 +C22.371,19.972,22.072,19.911,21.767,19.864 Z" /> + <path + android:fillColor="#F4EA11" + android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 +C20.372,28.584,20.404,28.213,20.449,27.844 +C20.463,27.74,20.481,27.635,20.497,27.532 +C20.542,27.248,20.6,26.969,20.671,26.695 +C20.694,26.603,20.715,26.512,20.741,26.423 +C20.95,25.7,21.246,25.017,21.616,24.379 +C21.649,24.322,21.683,24.27,21.716,24.215 +C21.888,23.931,22.075,23.658,22.276,23.396 +C22.302,23.362,22.325,23.328,22.351,23.295 +C22.83,22.687,23.385,22.143,23.998,21.671 +C24.008,21.664,24.016,21.657,24.025,21.65 C24.335,21.414,24.66,21.195,25,21 +C24.337,20.614,23.62,20.312,22.867,20.098 +C22.8,20.08,22.732,20.064,22.664,20.047 +C22.372,19.971,22.071,19.911,21.768,19.863 +C21.674,19.848,21.578,19.831,21.482,19.82 +C21.106,19.773,20.725,19.742,20.336,19.742 +C19.955,19.742,19.582,19.77,19.212,19.817 +C19.119,19.828,19.027,19.844,18.934,19.859 +C18.64,19.904,18.351,19.96,18.067,20.032 +C17.995,20.05,17.921,20.067,17.848,20.088 +C17.119,20.291,16.424,20.575,15.779,20.938 +C15.778,20.938,15.776,20.939,15.776,20.939 +C15.776,20.963,15.772,20.989,15.772,21.014 +C15.772,21.398,15.803,21.774,15.848,22.145 +C15.861,22.252,15.88,22.36,15.898,22.466 +C15.941,22.742,15.998,23.015,16.066,23.281 +C16.09,23.38,16.112,23.478,16.141,23.575 +C16.349,24.29,16.639,24.971,17.005,25.601 +C17.037,25.66,17.074,25.716,17.11,25.773 +C17.278,26.05,17.459,26.319,17.656,26.577 +C17.683,26.614,17.712,26.653,17.741,26.689 +C18.463,27.607,19.353,28.39,20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.48,19.821 C21.104,19.774,20.723,19.743,20.334,19.743 +C20.724,19.743,21.104,19.774,21.48,19.821 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 +C20.372,28.97,20.371,28.974,20.371,28.979 L20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.496,27.533 C20.48,27.636,20.462,27.74,20.448,27.845 +C20.462,27.74,20.48,27.636,20.496,27.533 Z" /> + <path + android:fillColor="#594098" + android:pathData="M18.066,20.033 C18.35,19.961,18.638,19.905,18.933,19.86 +C18.639,19.904,18.352,19.961,18.066,20.033 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.74,26.424 C20.714,26.514,20.694,26.605,20.67,26.696 +C20.693,26.604,20.714,26.514,20.74,26.424 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.847,22.146 C15.802,21.775,15.771,21.399,15.771,21.015 +C15.771,21.398,15.802,21.774,15.847,22.146 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.629,29.062 C29.625,29.453,29.592,29.837,29.541,30.218 +C29.592,29.837,29.625,29.452,29.629,29.062 L29.629,29.062 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.447,30.12 C20.402,29.747,20.37,29.372,20.37,28.983 +C20.371,29.372,20.402,29.747,20.447,30.12 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.351,34.677 C22.825,35.279,23.371,35.818,23.977,36.286 +C23.371,35.817,22.825,35.278,22.351,34.677 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.51,30.419 C29.455,30.757,29.387,31.087,29.297,31.409 +C29.387,31.087,29.455,30.757,29.51,30.419 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.996,36.306 C26.614,35.831,27.172,35.285,27.653,34.671 +C27.172,35.284,26.613,35.831,25.996,36.306 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.264,31.538 C29.049,32.284,28.741,32.989,28.356,33.645 +C28.74,32.989,29.049,32.284,29.264,31.538 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.667,31.267 C20.597,30.994,20.541,30.72,20.496,30.439 +C20.542,30.72,20.597,30.993,20.667,31.267 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.268,34.565 C22.069,34.307,21.886,34.038,21.717,33.756 +C21.886,34.038,22.069,34.308,22.268,34.565 Z" /> + <path + android:fillColor="#594098" + android:pathData="M28.295,33.743 C28.106,34.054,27.902,34.352,27.68,34.636 +C27.902,34.353,28.105,34.054,28.295,33.743 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.612,33.587 C21.242,32.95,20.949,32.269,20.74,31.55 +C20.949,32.269,21.242,32.95,21.612,33.587 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.966,36.327 C25.658,36.559,25.336,36.776,25,36.97 +C25.336,36.776,25.659,36.56,25.966,36.327 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.955,36.944 C24.641,36.76,24.339,36.557,24.05,36.34 +C24.339,36.558,24.64,36.761,24.955,36.944 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.54,29.901 C22.589,29.915,22.64,29.926,22.689,29.94 +C22.64,29.927,22.589,29.915,22.54,29.901 Z" /> + <path + android:fillColor="#594098" + android:pathData="M26.184,30.183 C26.282,30.171,26.375,30.156,26.471,30.14 +C26.375,30.155,26.281,30.171,26.184,30.183 Z" /> + <path + android:fillColor="#594098" + android:pathData="M23.638,30.136 C23.728,30.15,23.817,30.165,23.907,30.177 +C23.817,30.165,23.729,30.149,23.638,30.136 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.322,29.97 C27.4,29.952,27.48,29.933,27.558,29.909 +C27.48,29.933,27.4,29.952,27.322,29.97 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.625,29.058 C29.625,29.058,29.627,29.058,29.629,29.056 +C29.629,29.031,29.633,29.009,29.633,28.984 +C29.633,29.009,29.625,29.034,29.625,29.058 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.645,23.287 C27.17,22.686,26.622,22.147,26.014,21.681 +C26.621,22.146,27.168,22.688,27.645,23.287 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.961,21.642 C25.661,21.413,25.348,21.204,25.021,21.013 L25.019,21.013 +C25.346,21.204,25.662,21.415,25.961,21.642 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.373,28.978 L20.373,28.978 L20.373,28.984 L20.373,28.984 L20.373,28.978 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.555,27.851 C29.602,28.223,29.633,28.601,29.633,28.984 +C29.633,28.601,29.602,28.223,29.555,27.851 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.274,23.396 C22.073,23.659,21.887,23.931,21.714,24.215 +C21.887,23.933,22.074,23.658,22.274,23.396 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.67,26.696 C20.599,26.969,20.542,27.249,20.496,27.533 +C20.542,27.25,20.599,26.97,20.67,26.696 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.448,27.845 C20.403,28.214,20.371,28.585,20.371,28.966 +C20.372,28.585,20.402,28.212,20.448,27.845 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.615,24.38 C21.245,25.018,20.949,25.701,20.74,26.424 +C20.949,25.702,21.245,25.017,21.615,24.38 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.336,26.71 C29.404,26.98,29.461,27.253,29.508,27.532 +C29.461,27.253,29.404,26.979,29.336,26.71 Z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M29.625,29.058 C29.625,29.035,29.633,29.009,29.633,28.984 +C29.633,28.601,29.602,28.223,29.555,27.851 +C29.543,27.743,29.524,27.639,29.508,27.533 +C29.461,27.254,29.404,26.98,29.336,26.711 +C29.311,26.614,29.289,26.516,29.262,26.419 +C29.053,25.705,28.76,25.024,28.395,24.393 +C28.356,24.33,28.317,24.266,28.28,24.204 +C28.112,23.933,27.934,23.671,27.743,23.419 +C27.71,23.376,27.679,23.332,27.645,23.289 +C27.168,22.689,26.622,22.147,26.014,21.683 +C25.998,21.669,25.979,21.657,25.962,21.644 +C25.662,21.417,25.347,21.206,25.02,21.015 +C24.686,21.21,24.353,21.408,24.047,21.639 +C24.039,21.644,24.032,21.65,24.025,21.654 +C24.016,21.661,24.007,21.668,23.998,21.675 +C23.383,22.147,22.831,22.692,22.351,23.299 +C22.325,23.331,22.302,23.365,22.276,23.4 +C22.075,23.662,21.889,23.936,21.716,24.219 +C21.683,24.274,21.649,24.326,21.616,24.383 +C21.246,25.02,20.95,25.705,20.741,26.427 +C20.715,26.517,20.695,26.608,20.671,26.699 +C20.6,26.972,20.543,27.253,20.497,27.536 +C20.481,27.639,20.463,27.743,20.449,27.848 +C20.403,28.215,20.372,28.588,20.372,28.969 +C20.372,28.973,20.371,28.977,20.371,28.983 L20.376,28.985 L20.376,28.985 +C21.049,29.378,21.775,29.688,22.54,29.905 +C22.589,29.919,22.64,29.93,22.689,29.944 C23,30.028,23.316,30.09,23.638,30.139 +C23.728,30.153,23.817,30.168,23.907,30.18 +C24.287,30.229,24.67,30.26,25.063,30.26 +C25.444,30.26,25.817,30.231,26.184,30.186 +C26.282,30.174,26.375,30.159,26.471,30.143 +C26.76,30.098,27.043,30.043,27.323,29.973 +C27.401,29.955,27.481,29.936,27.559,29.912 +C28.288,29.709,28.983,29.426,29.629,29.06 +C29.629,29.06,29.629,29.06,29.629,29.064 L29.629,29.064 +C29.629,29.06,29.629,29.06,29.629,29.058 +C29.627,29.058,29.625,29.058,29.625,29.058 Z" /> + <path + android:fillColor="#594098" + android:pathData="M28.395,24.392 C28.76,25.024,29.053,25.704,29.262,26.418 +C29.053,25.702,28.76,25.024,28.395,24.392 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25,21.001 C25.007,21.005,25.012,21.011,25.019,21.013 L25.021,21.013 +C25.012,21.009,25.007,21.005,24.999,21 +C24.999,21.001,24.999,21.001,24.999,21.001 L25,21.001 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.742,23.417 C27.933,23.669,28.111,23.932,28.279,24.202 +C28.111,23.931,27.934,23.669,27.742,23.417 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.998,36.971 L24.998,36.971 L24.998,36.972 L24.998,36.972 L24.998,36.971 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M28.355,33.646 C28.335,33.679,28.314,33.71,28.294,33.744 +C28.314,33.71,28.336,33.679,28.355,33.646 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M25.996,36.306 C25.986,36.314,25.975,36.32,25.967,36.327 +C25.975,36.319,25.986,36.313,25.996,36.306 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.51,30.419 C29.52,30.351,29.531,30.284,29.541,30.218 +C29.531,30.284,29.52,30.351,29.51,30.419 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.297,31.409 C29.287,31.454,29.277,31.497,29.264,31.538 +C29.277,31.497,29.287,31.454,29.297,31.409 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M27.68,34.636 C27.67,34.65,27.662,34.661,27.653,34.671 +C27.662,34.661,27.67,34.649,27.68,34.636 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.999,36.972 L24.999,36.972 L25,36.97 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.981 L20.371,28.983 L20.371,28.981 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.955,36.944 C24.97,36.952,24.982,36.964,24.997,36.971 +C24.998,36.971,24.998,36.971,24.998,36.971 +C24.985,36.964,24.97,36.952,24.955,36.944 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.447,30.12 C20.46,30.227,20.478,30.331,20.496,30.438 +C20.48,30.331,20.46,30.226,20.447,30.12 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M21.716,33.757 C21.68,33.7,21.644,33.646,21.612,33.587 +C21.645,33.646,21.68,33.7,21.716,33.757 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M22.351,34.677 C22.323,34.642,22.296,34.605,22.268,34.566 +C22.296,34.604,22.323,34.642,22.351,34.677 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.74,31.55 C20.714,31.456,20.692,31.362,20.668,31.267 +C20.692,31.362,20.712,31.456,20.74,31.55 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 +C24.002,36.306,24.026,36.321,24.05,36.341 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.981 L20.371,28.981 L20.371,28.979 Z" /> + <path + android:fillColor="#6FCBDC" + android:pathData="M27.559,29.909 C27.481,29.932,27.401,29.952,27.323,29.97 +C27.044,30.04,26.761,30.095,26.471,30.14 +C26.375,30.156,26.282,30.171,26.184,30.183 +C25.815,30.226,25.444,30.257,25.063,30.257 +C24.671,30.257,24.287,30.226,23.907,30.177 +C23.817,30.165,23.728,30.15,23.638,30.136 C23.315,30.087,23,30.023,22.689,29.941 +C22.639,29.927,22.589,29.916,22.54,29.902 +C21.77,29.687,21.045,29.377,20.371,28.982 L20.371,28.984 +C20.371,29.373,20.402,29.748,20.448,30.121 +C20.461,30.226,20.481,30.332,20.497,30.439 +C20.542,30.72,20.598,30.994,20.668,31.267 +C20.692,31.363,20.714,31.456,20.74,31.55 +C20.949,32.269,21.242,32.95,21.612,33.587 +C21.645,33.646,21.68,33.7,21.716,33.757 +C21.885,34.038,22.069,34.308,22.267,34.566 +C22.296,34.605,22.322,34.642,22.35,34.677 +C22.824,35.279,23.37,35.818,23.976,36.286 +C24.001,36.306,24.025,36.321,24.049,36.341 +C24.338,36.558,24.64,36.761,24.954,36.945 +C24.969,36.953,24.984,36.965,24.997,36.972 +C24.998,36.972,24.998,36.972,24.998,36.97 +C25.334,36.777,25.657,36.56,25.964,36.327 +C25.973,36.319,25.984,36.313,25.993,36.306 +C26.611,35.831,27.169,35.285,27.65,34.671 +C27.66,34.661,27.668,34.65,27.677,34.636 +C27.9,34.353,28.103,34.054,28.292,33.743 +C28.312,33.71,28.333,33.679,28.353,33.645 +C28.738,32.989,29.046,32.284,29.261,31.538 +C29.275,31.497,29.284,31.454,29.294,31.409 +C29.384,31.087,29.452,30.757,29.507,30.419 +C29.517,30.351,29.528,30.284,29.538,30.218 +C29.589,29.837,29.622,29.452,29.626,29.062 +C28.982,29.423,28.289,29.708,27.559,29.909 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.629,29.058 C28.983,29.423,28.287,29.706,27.559,29.91 +C28.289,29.709,28.983,29.424,29.629,29.062 +C29.629,29.058,29.629,29.058,29.629,29.058 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.981 C21.045,29.376,21.771,29.686,22.54,29.901 +C21.775,29.684,21.049,29.374,20.376,28.981 +C20.433,29.016,20.491,29.049,20.548,29.083 +C20.66,29.145,20.775,29.206,20.893,29.263 +C20.775,29.206,20.66,29.146,20.548,29.083 +C20.49,29.05,20.433,29.017,20.376,28.981 +C20.375,28.981,20.372,28.981,20.371,28.979 +C20.371,28.981,20.371,28.981,20.371,28.981 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M23.907,30.177 C24.287,30.226,24.671,30.257,25.063,30.257 +C24.67,30.257,24.287,30.226,23.907,30.177 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M22.689,29.94 C23,30.022,23.314,30.086,23.638,30.135 +C23.316,30.087,23,30.024,22.689,29.94 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M25.063,30.257 C25.444,30.257,25.815,30.226,26.184,30.183 +C25.817,30.228,25.444,30.257,25.063,30.257 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M26.471,30.14 C26.76,30.095,27.043,30.04,27.323,29.97 +C27.043,30.04,26.76,30.095,26.471,30.14 Z" /> + <path + android:fillColor="#000000" + android:strokeWidth="1" + android:pathData="M40.5984,32.3655 L47.2114,32.3225 L43.9421,38.071 Z" /> +</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml new file mode 100755 index 00000000..fead091c --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/icon_proof_colors_up.xml @@ -0,0 +1,648 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="50dp" + android:height="50dp" + android:viewportWidth="50" + android:viewportHeight="50"> + + <path + android:pathData="M15.771,20.94 L15.775,20.94 L15.775,20.941 L15.771,20.941 L15.771,20.94 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M21.48,19.821 C21.576,19.832,21.672,19.849,21.766,19.864 +C21.671,19.85,21.576,19.833,21.48,19.821 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M17.847,20.089 C17.92,20.068,17.994,20.051,18.066,20.033 +C17.993,20.051,17.92,20.068,17.847,20.089 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M18.933,19.86 C19.026,19.845,19.118,19.829,19.211,19.818 +C19.118,19.829,19.026,19.846,18.933,19.86 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M22.663,20.048 C22.73,20.065,22.799,20.081,22.866,20.099 +C22.799,20.081,22.73,20.064,22.663,20.048 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M30.82,19.822 C30.91,19.833,30.998,19.849,31.088,19.863 +C30.998,19.85,30.91,19.833,30.82,19.822 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M32.039,20.06 C32.086,20.073,32.139,20.083,32.185,20.097 +C32.139,20.083,32.086,20.072,32.039,20.06 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M28.027,19.895 C28.099,19.882,28.172,19.873,28.242,19.862 +C28.172,19.874,28.1,19.882,28.027,19.895 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M26.605,20.266 C26.628,20.258,26.652,20.248,26.675,20.241 +C26.652,20.248,26.629,20.258,26.605,20.266 Z" /> + <path + android:fillColor="#7AC698" + android:pathData="M15.778,20.938 L15.775,20.939 L15.775,20.939 Z" /> + <path + android:fillColor="#ED2427" + android:pathData="M17.847,20.089 C17.92,20.068,17.993,20.051,18.066,20.033 +C18.351,19.961,18.638,19.904,18.933,19.86 +C19.026,19.845,19.118,19.829,19.211,19.818 +C19.581,19.773,19.954,19.743,20.335,19.743 +C20.724,19.743,21.105,19.774,21.481,19.821 +C21.577,19.833,21.671,19.849,21.767,19.864 +C22.072,19.911,22.371,19.971,22.663,20.048 +C22.73,20.065,22.799,20.081,22.866,20.099 C23.621,20.311,24.336,20.616,24.999,21 +C25.507,20.707,26.043,20.461,26.606,20.266 +C26.629,20.258,26.653,20.248,26.676,20.241 +C27.112,20.094,27.565,19.978,28.028,19.895 +C28.1,19.882,28.173,19.874,28.243,19.862 +C28.708,19.792,29.179,19.744,29.663,19.744 +C30.056,19.744,30.44,19.775,30.821,19.823 +C30.911,19.834,30.999,19.85,31.089,19.864 +C31.411,19.913,31.73,19.978,32.04,20.06 +C32.087,20.073,32.14,20.083,32.186,20.097 +C32.956,20.313,33.684,20.624,34.358,21.019 +C34.358,21.018,34.358,21.016,34.358,21.015 +C34.358,15.911,30.198,11.773,25.064,11.773 +C19.96,11.773,15.817,15.87,15.776,20.94 +C15.776,20.939,15.777,20.939,15.779,20.939 +C16.423,20.574,17.118,20.29,17.847,20.089 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.275,22.189 C34.263,22.276,34.248,22.36,34.234,22.446 +C34.248,22.36,34.264,22.276,34.275,22.189 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M30.658,28.384 C30.644,28.394,30.629,28.405,30.613,28.415 +C30.629,28.405,30.645,28.394,30.658,28.384 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.045,23.362 C34.024,23.435,34.008,23.51,33.986,23.584 +C34.008,23.511,34.023,23.436,34.045,23.362 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M32.383,26.698 C32.373,26.713,32.362,26.726,32.352,26.739 +C32.361,26.727,32.373,26.711,32.383,26.698 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M33.084,25.667 C33.055,25.719,33.022,25.771,32.99,25.822 +C33.021,25.771,33.055,25.719,33.084,25.667 Z" /> + <path + android:fillColor="#3A54A4" + android:pathData="M34.357,21.019 C34.357,21.416,34.324,21.806,34.275,22.19 +C34.263,22.277,34.248,22.361,34.234,22.447 +C34.187,22.759,34.123,23.064,34.045,23.363 +C34.024,23.436,34.008,23.511,33.986,23.585 +C33.771,24.322,33.466,25.019,33.084,25.668 +C33.055,25.72,33.022,25.772,32.99,25.823 +C32.804,26.127,32.601,26.419,32.383,26.699 +C32.373,26.712,32.362,26.727,32.352,26.74 +C31.86,27.358,31.29,27.908,30.659,28.385 +C30.645,28.395,30.63,28.406,30.614,28.416 C30.3,28.65,29.973,28.869,29.63,29.062 +C29.626,29.453,29.593,29.837,29.542,30.218 +C29.532,30.284,29.521,30.351,29.511,30.419 +C29.456,30.757,29.388,31.087,29.298,31.409 +C29.288,31.454,29.278,31.497,29.265,31.538 +C29.05,32.284,28.742,32.989,28.357,33.645 +C28.337,33.678,28.316,33.709,28.296,33.743 +C28.107,34.054,27.903,34.352,27.681,34.636 +C27.671,34.65,27.663,34.661,27.654,34.671 +C27.174,35.284,26.615,35.831,25.997,36.306 +C25.987,36.314,25.976,36.32,25.968,36.327 +C25.66,36.559,25.338,36.776,25.002,36.97 +C25.002,36.972,25.002,36.972,25.001,36.972 +C26.372,37.765,27.963,38.228,29.665,38.228 +C34.802,38.228,38.96,34.089,38.96,28.984 +C38.957,25.588,37.107,22.625,34.357,21.019 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M25.961,21.642 C25.979,21.655,25.997,21.667,26.013,21.681 +C25.998,21.667,25.979,21.654,25.961,21.642 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.508,27.532 C29.524,27.638,29.543,27.742,29.555,27.85 +C29.543,27.742,29.523,27.639,29.508,27.532 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M31.088,19.863 C31.41,19.913,31.729,19.977,32.039,20.059 +C31.729,19.978,31.41,19.912,31.088,19.863 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.662,19.743 C30.055,19.743,30.439,19.774,30.82,19.822 +C30.439,19.774,30.055,19.743,29.662,19.743 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M27.645,23.287 C27.678,23.33,27.709,23.374,27.743,23.417 +C27.709,23.374,27.678,23.33,27.645,23.287 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.262,26.418 C29.289,26.515,29.311,26.613,29.336,26.71 +C29.311,26.613,29.289,26.515,29.262,26.418 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M28.279,24.202 C28.316,24.264,28.355,24.328,28.394,24.391 +C28.355,24.328,28.316,24.265,28.279,24.202 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.662,19.743 C29.178,19.743,28.707,19.791,28.242,19.861 +C28.705,19.791,29.178,19.743,29.662,19.743 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.355,21.02 C34.355,21.416,34.324,21.806,34.275,22.19 +C34.324,21.806,34.357,21.417,34.357,21.019 +C33.683,20.624,32.955,20.313,32.185,20.097 +C32.953,20.314,33.682,20.627,34.355,21.02 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M32.99,25.822 C32.804,26.126,32.601,26.42,32.383,26.698 +C32.602,26.418,32.805,26.126,32.99,25.822 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M33.986,23.584 C33.771,24.321,33.466,25.02,33.084,25.667 +C33.467,25.018,33.771,24.321,33.986,23.584 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M29.629,29.056 C29.629,29.058,29.629,29.058,29.629,29.062 +C29.973,28.869,30.299,28.65,30.613,28.416 +C30.301,28.647,29.973,28.862,29.629,29.056 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M26.676,20.24 C27.112,20.092,27.565,19.978,28.028,19.894 +C27.564,19.978,27.111,20.093,26.676,20.24 Z" /> + <path + android:fillColor="#B9529E" + android:pathData="M32.186,20.097 C32.139,20.083,32.086,20.073,32.04,20.06 +C31.729,19.978,31.411,19.914,31.089,19.864 +C30.999,19.85,30.911,19.834,30.821,19.823 +C30.44,19.775,30.055,19.744,29.663,19.744 +C29.179,19.744,28.706,19.792,28.243,19.862 +C28.173,19.873,28.1,19.883,28.028,19.895 +C27.565,19.979,27.112,20.092,26.676,20.241 +C26.653,20.249,26.629,20.259,26.606,20.266 +C26.047,20.462,25.524,20.721,25.022,21.013 +C25.349,21.204,25.663,21.413,25.962,21.642 +C25.98,21.655,25.998,21.667,26.014,21.681 +C26.621,22.148,27.17,22.687,27.645,23.287 +C27.678,23.33,27.709,23.374,27.743,23.417 +C27.934,23.669,28.112,23.931,28.28,24.202 +C28.317,24.264,28.356,24.328,28.395,24.391 +C28.76,25.024,29.053,25.702,29.262,26.417 +C29.289,26.514,29.311,26.612,29.336,26.709 +C29.404,26.979,29.461,27.252,29.508,27.531 +C29.524,27.637,29.543,27.741,29.555,27.849 +C29.602,28.221,29.633,28.599,29.633,28.982 +C29.633,29.007,29.629,29.029,29.629,29.054 +C29.973,28.861,30.301,28.646,30.613,28.413 +C30.629,28.403,30.644,28.392,30.658,28.382 +C31.289,27.905,31.859,27.355,32.351,26.737 +C32.361,26.724,32.372,26.711,32.382,26.696 +C32.601,26.418,32.804,26.124,32.989,25.82 +C33.02,25.768,33.053,25.716,33.083,25.665 +C33.466,25.018,33.771,24.319,33.985,23.582 +C34.006,23.509,34.022,23.434,34.044,23.36 +C34.122,23.061,34.187,22.755,34.233,22.444 +C34.247,22.358,34.262,22.274,34.274,22.187 +C34.323,21.803,34.354,21.414,34.354,21.017 +C33.682,20.627,32.953,20.314,32.186,20.097 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M30.658,28.384 C31.289,27.907,31.859,27.358,32.351,26.739 +C31.859,27.356,31.289,27.907,30.658,28.384 Z" /> + <path + android:fillColor="#2A368E" + android:pathData="M34.234,22.446 C34.187,22.757,34.123,23.063,34.045,23.362 +C34.123,23.063,34.188,22.759,34.234,22.446 Z" /> + <path + android:fillColor="#594098" + android:pathData="M16.141,23.576 C16.112,23.479,16.09,23.381,16.066,23.282 +C16.089,23.381,16.112,23.479,16.141,23.576 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.775,20.939 C15.774,20.939,15.773,20.941,15.771,20.942 L15.771,21.014 +C15.771,20.989,15.775,20.964,15.775,20.939 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.741,26.69 C17.712,26.654,17.683,26.615,17.656,26.578 +C17.685,26.615,17.712,26.654,17.741,26.69 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.109,25.774 C17.073,25.717,17.036,25.661,17.004,25.602 +C17.038,25.661,17.074,25.718,17.109,25.774 Z" /> + <path + android:fillColor="#6ABC45" + android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 +C23.371,35.817,22.824,35.278,22.351,34.677 +C22.323,34.642,22.296,34.605,22.268,34.566 +C22.069,34.308,21.886,34.039,21.717,33.757 +C21.681,33.7,21.645,33.646,21.613,33.587 C21.243,32.95,20.95,32.269,20.741,31.55 +C20.714,31.456,20.693,31.362,20.669,31.267 +C20.599,30.994,20.543,30.72,20.498,30.439 +C20.48,30.332,20.462,30.228,20.449,30.121 +C20.404,29.748,20.372,29.373,20.372,28.984 L20.372,28.982 +C19.356,28.39,18.465,27.611,17.742,26.691 +C17.713,26.655,17.686,26.616,17.657,26.579 +C17.46,26.32,17.279,26.053,17.111,25.775 +C17.075,25.718,17.04,25.662,17.006,25.603 +C16.64,24.97,16.349,24.292,16.142,23.577 +C16.113,23.48,16.091,23.382,16.067,23.283 +C15.998,23.014,15.942,22.744,15.899,22.468 +C15.881,22.361,15.863,22.256,15.849,22.147 +C15.804,21.776,15.773,21.4,15.773,21.016 L15.773,20.944 +C12.953,22.531,11.044,25.537,11.044,28.985 +C11.044,34.09,15.209,38.229,20.336,38.229 +C22.038,38.229,23.627,37.768,24.999,36.973 +C24.984,36.965,24.972,36.953,24.957,36.946 +C24.64,36.761,24.339,36.558,24.05,36.341 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.897,22.467 C15.879,22.361,15.86,22.253,15.847,22.146 +C15.861,22.255,15.879,22.359,15.897,22.467 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.715,24.216 C21.682,24.271,21.648,24.323,21.615,24.38 +C21.647,24.323,21.682,24.271,21.715,24.216 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.35,23.296 C22.324,23.328,22.301,23.362,22.275,23.397 +C22.3,23.362,22.324,23.328,22.35,23.296 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.024,21.651 C24.015,21.658,24.006,21.665,23.997,21.672 +C24.006,21.665,24.015,21.658,24.024,21.651 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.999,21 C24.336,20.615,23.622,20.311,22.866,20.099 +C23.619,20.313,24.336,20.615,24.999,21 C24.999,21.001,24.999,21.001,24.999,21 Z" /> + <path + android:fillColor="#594098" + android:pathData="M16.065,23.282 C15.996,23.015,15.94,22.743,15.897,22.467 +C15.94,22.743,15.997,23.014,16.065,23.282 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.656,26.578 C17.459,26.32,17.278,26.052,17.11,25.774 +C17.278,26.052,17.458,26.319,17.656,26.578 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.004,25.603 C16.638,24.972,16.348,24.291,16.14,23.577 +C16.347,24.292,16.639,24.97,17.004,25.603 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.778,20.938 C16.424,20.576,17.119,20.292,17.847,20.088 +C17.118,20.29,16.423,20.574,15.778,20.938 Z" /> + <path + android:fillColor="#594098" + android:pathData="M19.211,19.818 C19.581,19.771,19.953,19.743,20.335,19.743 +C19.954,19.743,19.581,19.773,19.211,19.818 Z" /> + <path + android:fillColor="#594098" + android:pathData="M17.741,26.69 C18.464,27.61,19.355,28.389,20.371,28.981 L20.371,28.979 +C19.353,28.39,18.463,27.607,17.741,26.69 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.767,19.864 C22.071,19.912,22.371,19.971,22.663,20.048 +C22.371,19.972,22.072,19.911,21.767,19.864 Z" /> + <path + android:fillColor="#F4EA11" + android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 +C20.372,28.584,20.404,28.213,20.449,27.844 +C20.463,27.74,20.481,27.635,20.497,27.532 +C20.542,27.248,20.6,26.969,20.671,26.695 +C20.694,26.603,20.715,26.512,20.741,26.423 +C20.95,25.7,21.246,25.017,21.616,24.379 +C21.649,24.322,21.683,24.27,21.716,24.215 +C21.888,23.931,22.075,23.658,22.276,23.396 +C22.302,23.362,22.325,23.328,22.351,23.295 +C22.83,22.687,23.385,22.143,23.998,21.671 +C24.008,21.664,24.016,21.657,24.025,21.65 C24.335,21.414,24.66,21.195,25,21 +C24.337,20.614,23.62,20.312,22.867,20.098 +C22.8,20.08,22.732,20.064,22.664,20.047 +C22.372,19.971,22.071,19.911,21.768,19.863 +C21.674,19.848,21.578,19.831,21.482,19.82 +C21.106,19.773,20.725,19.742,20.336,19.742 +C19.955,19.742,19.582,19.77,19.212,19.817 +C19.119,19.828,19.027,19.844,18.934,19.859 +C18.64,19.904,18.351,19.96,18.067,20.032 +C17.995,20.05,17.921,20.067,17.848,20.088 +C17.119,20.291,16.424,20.575,15.779,20.938 +C15.778,20.938,15.776,20.939,15.776,20.939 +C15.776,20.963,15.772,20.989,15.772,21.014 +C15.772,21.398,15.803,21.774,15.848,22.145 +C15.861,22.252,15.88,22.36,15.898,22.466 +C15.941,22.742,15.998,23.015,16.066,23.281 +C16.09,23.38,16.112,23.478,16.141,23.575 +C16.349,24.29,16.639,24.971,17.005,25.601 +C17.037,25.66,17.074,25.716,17.11,25.773 +C17.278,26.05,17.459,26.319,17.656,26.577 +C17.683,26.614,17.712,26.653,17.741,26.689 +C18.463,27.607,19.353,28.39,20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.48,19.821 C21.104,19.774,20.723,19.743,20.334,19.743 +C20.724,19.743,21.104,19.774,21.48,19.821 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.371,28.979 C20.371,28.973,20.372,28.969,20.372,28.965 +C20.372,28.97,20.371,28.974,20.371,28.979 L20.371,28.979 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.496,27.533 C20.48,27.636,20.462,27.74,20.448,27.845 +C20.462,27.74,20.48,27.636,20.496,27.533 Z" /> + <path + android:fillColor="#594098" + android:pathData="M18.066,20.033 C18.35,19.961,18.638,19.905,18.933,19.86 +C18.639,19.904,18.352,19.961,18.066,20.033 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.74,26.424 C20.714,26.514,20.694,26.605,20.67,26.696 +C20.693,26.604,20.714,26.514,20.74,26.424 Z" /> + <path + android:fillColor="#594098" + android:pathData="M15.847,22.146 C15.802,21.775,15.771,21.399,15.771,21.015 +C15.771,21.398,15.802,21.774,15.847,22.146 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.629,29.062 C29.625,29.453,29.592,29.837,29.541,30.218 +C29.592,29.837,29.625,29.452,29.629,29.062 L29.629,29.062 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.447,30.12 C20.402,29.747,20.37,29.372,20.37,28.983 +C20.371,29.372,20.402,29.747,20.447,30.12 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.351,34.677 C22.825,35.279,23.371,35.818,23.977,36.286 +C23.371,35.817,22.825,35.278,22.351,34.677 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.51,30.419 C29.455,30.757,29.387,31.087,29.297,31.409 +C29.387,31.087,29.455,30.757,29.51,30.419 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.996,36.306 C26.614,35.831,27.172,35.285,27.653,34.671 +C27.172,35.284,26.613,35.831,25.996,36.306 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.264,31.538 C29.049,32.284,28.741,32.989,28.356,33.645 +C28.74,32.989,29.049,32.284,29.264,31.538 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.667,31.267 C20.597,30.994,20.541,30.72,20.496,30.439 +C20.542,30.72,20.597,30.993,20.667,31.267 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.268,34.565 C22.069,34.307,21.886,34.038,21.717,33.756 +C21.886,34.038,22.069,34.308,22.268,34.565 Z" /> + <path + android:fillColor="#594098" + android:pathData="M28.295,33.743 C28.106,34.054,27.902,34.352,27.68,34.636 +C27.902,34.353,28.105,34.054,28.295,33.743 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.612,33.587 C21.242,32.95,20.949,32.269,20.74,31.55 +C20.949,32.269,21.242,32.95,21.612,33.587 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.966,36.327 C25.658,36.559,25.336,36.776,25,36.97 +C25.336,36.776,25.659,36.56,25.966,36.327 Z" /> + <path + android:fillColor="#594098" + android:pathData="M24.955,36.944 C24.641,36.76,24.339,36.557,24.05,36.34 +C24.339,36.558,24.64,36.761,24.955,36.944 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.54,29.901 C22.589,29.915,22.64,29.926,22.689,29.94 +C22.64,29.927,22.589,29.915,22.54,29.901 Z" /> + <path + android:fillColor="#594098" + android:pathData="M26.184,30.183 C26.282,30.171,26.375,30.156,26.471,30.14 +C26.375,30.155,26.281,30.171,26.184,30.183 Z" /> + <path + android:fillColor="#594098" + android:pathData="M23.638,30.136 C23.728,30.15,23.817,30.165,23.907,30.177 +C23.817,30.165,23.729,30.149,23.638,30.136 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.322,29.97 C27.4,29.952,27.48,29.933,27.558,29.909 +C27.48,29.933,27.4,29.952,27.322,29.97 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.625,29.058 C29.625,29.058,29.627,29.058,29.629,29.056 +C29.629,29.031,29.633,29.009,29.633,28.984 +C29.633,29.009,29.625,29.034,29.625,29.058 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.645,23.287 C27.17,22.686,26.622,22.147,26.014,21.681 +C26.621,22.146,27.168,22.688,27.645,23.287 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25.961,21.642 C25.661,21.413,25.348,21.204,25.021,21.013 L25.019,21.013 +C25.346,21.204,25.662,21.415,25.961,21.642 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.373,28.978 L20.373,28.978 L20.373,28.984 L20.373,28.984 L20.373,28.978 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.555,27.851 C29.602,28.223,29.633,28.601,29.633,28.984 +C29.633,28.601,29.602,28.223,29.555,27.851 Z" /> + <path + android:fillColor="#594098" + android:pathData="M22.274,23.396 C22.073,23.659,21.887,23.931,21.714,24.215 +C21.887,23.933,22.074,23.658,22.274,23.396 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.67,26.696 C20.599,26.969,20.542,27.249,20.496,27.533 +C20.542,27.25,20.599,26.97,20.67,26.696 Z" /> + <path + android:fillColor="#594098" + android:pathData="M20.448,27.845 C20.403,28.214,20.371,28.585,20.371,28.966 +C20.372,28.585,20.402,28.212,20.448,27.845 Z" /> + <path + android:fillColor="#594098" + android:pathData="M21.615,24.38 C21.245,25.018,20.949,25.701,20.74,26.424 +C20.949,25.702,21.245,25.017,21.615,24.38 Z" /> + <path + android:fillColor="#594098" + android:pathData="M29.336,26.71 C29.404,26.98,29.461,27.253,29.508,27.532 +C29.461,27.253,29.404,26.979,29.336,26.71 Z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M29.625,29.058 C29.625,29.035,29.633,29.009,29.633,28.984 +C29.633,28.601,29.602,28.223,29.555,27.851 +C29.543,27.743,29.524,27.639,29.508,27.533 +C29.461,27.254,29.404,26.98,29.336,26.711 +C29.311,26.614,29.289,26.516,29.262,26.419 +C29.053,25.705,28.76,25.024,28.395,24.393 +C28.356,24.33,28.317,24.266,28.28,24.204 +C28.112,23.933,27.934,23.671,27.743,23.419 +C27.71,23.376,27.679,23.332,27.645,23.289 +C27.168,22.689,26.622,22.147,26.014,21.683 +C25.998,21.669,25.979,21.657,25.962,21.644 +C25.662,21.417,25.347,21.206,25.02,21.015 +C24.686,21.21,24.353,21.408,24.047,21.639 +C24.039,21.644,24.032,21.65,24.025,21.654 +C24.016,21.661,24.007,21.668,23.998,21.675 +C23.383,22.147,22.831,22.692,22.351,23.299 +C22.325,23.331,22.302,23.365,22.276,23.4 +C22.075,23.662,21.889,23.936,21.716,24.219 +C21.683,24.274,21.649,24.326,21.616,24.383 +C21.246,25.02,20.95,25.705,20.741,26.427 +C20.715,26.517,20.695,26.608,20.671,26.699 +C20.6,26.972,20.543,27.253,20.497,27.536 +C20.481,27.639,20.463,27.743,20.449,27.848 +C20.403,28.215,20.372,28.588,20.372,28.969 +C20.372,28.973,20.371,28.977,20.371,28.983 L20.376,28.985 L20.376,28.985 +C21.049,29.378,21.775,29.688,22.54,29.905 +C22.589,29.919,22.64,29.93,22.689,29.944 C23,30.028,23.316,30.09,23.638,30.139 +C23.728,30.153,23.817,30.168,23.907,30.18 +C24.287,30.229,24.67,30.26,25.063,30.26 +C25.444,30.26,25.817,30.231,26.184,30.186 +C26.282,30.174,26.375,30.159,26.471,30.143 +C26.76,30.098,27.043,30.043,27.323,29.973 +C27.401,29.955,27.481,29.936,27.559,29.912 +C28.288,29.709,28.983,29.426,29.629,29.06 +C29.629,29.06,29.629,29.06,29.629,29.064 L29.629,29.064 +C29.629,29.06,29.629,29.06,29.629,29.058 +C29.627,29.058,29.625,29.058,29.625,29.058 Z" /> + <path + android:fillColor="#594098" + android:pathData="M28.395,24.392 C28.76,25.024,29.053,25.704,29.262,26.418 +C29.053,25.702,28.76,25.024,28.395,24.392 Z" /> + <path + android:fillColor="#594098" + android:pathData="M25,21.001 C25.007,21.005,25.012,21.011,25.019,21.013 L25.021,21.013 +C25.012,21.009,25.007,21.005,24.999,21 +C24.999,21.001,24.999,21.001,24.999,21.001 L25,21.001 Z" /> + <path + android:fillColor="#594098" + android:pathData="M27.742,23.417 C27.933,23.669,28.111,23.932,28.279,24.202 +C28.111,23.931,27.934,23.669,27.742,23.417 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.998,36.971 L24.998,36.971 L24.998,36.972 L24.998,36.972 L24.998,36.971 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M28.355,33.646 C28.335,33.679,28.314,33.71,28.294,33.744 +C28.314,33.71,28.336,33.679,28.355,33.646 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M25.996,36.306 C25.986,36.314,25.975,36.32,25.967,36.327 +C25.975,36.319,25.986,36.313,25.996,36.306 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.51,30.419 C29.52,30.351,29.531,30.284,29.541,30.218 +C29.531,30.284,29.52,30.351,29.51,30.419 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.297,31.409 C29.287,31.454,29.277,31.497,29.264,31.538 +C29.277,31.497,29.287,31.454,29.297,31.409 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M27.68,34.636 C27.67,34.65,27.662,34.661,27.653,34.671 +C27.662,34.661,27.67,34.649,27.68,34.636 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.999,36.972 L24.999,36.972 L25,36.97 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.981 L20.371,28.983 L20.371,28.981 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.955,36.944 C24.97,36.952,24.982,36.964,24.997,36.971 +C24.998,36.971,24.998,36.971,24.998,36.971 +C24.985,36.964,24.97,36.952,24.955,36.944 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.447,30.12 C20.46,30.227,20.478,30.331,20.496,30.438 +C20.48,30.331,20.46,30.226,20.447,30.12 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M21.716,33.757 C21.68,33.7,21.644,33.646,21.612,33.587 +C21.645,33.646,21.68,33.7,21.716,33.757 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M22.351,34.677 C22.323,34.642,22.296,34.605,22.268,34.566 +C22.296,34.604,22.323,34.642,22.351,34.677 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.74,31.55 C20.714,31.456,20.692,31.362,20.668,31.267 +C20.692,31.362,20.712,31.456,20.74,31.55 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M24.05,36.341 C24.026,36.321,24.002,36.306,23.977,36.286 +C24.002,36.306,24.026,36.321,24.05,36.341 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.979 L20.371,28.979 L20.371,28.981 L20.371,28.981 L20.371,28.979 Z" /> + <path + android:fillColor="#6FCBDC" + android:pathData="M27.559,29.909 C27.481,29.932,27.401,29.952,27.323,29.97 +C27.044,30.04,26.761,30.095,26.471,30.14 +C26.375,30.156,26.282,30.171,26.184,30.183 +C25.815,30.226,25.444,30.257,25.063,30.257 +C24.671,30.257,24.287,30.226,23.907,30.177 +C23.817,30.165,23.728,30.15,23.638,30.136 C23.315,30.087,23,30.023,22.689,29.941 +C22.639,29.927,22.589,29.916,22.54,29.902 +C21.77,29.687,21.045,29.377,20.371,28.982 L20.371,28.984 +C20.371,29.373,20.402,29.748,20.448,30.121 +C20.461,30.226,20.481,30.332,20.497,30.439 +C20.542,30.72,20.598,30.994,20.668,31.267 +C20.692,31.363,20.714,31.456,20.74,31.55 +C20.949,32.269,21.242,32.95,21.612,33.587 +C21.645,33.646,21.68,33.7,21.716,33.757 +C21.885,34.038,22.069,34.308,22.267,34.566 +C22.296,34.605,22.322,34.642,22.35,34.677 +C22.824,35.279,23.37,35.818,23.976,36.286 +C24.001,36.306,24.025,36.321,24.049,36.341 +C24.338,36.558,24.64,36.761,24.954,36.945 +C24.969,36.953,24.984,36.965,24.997,36.972 +C24.998,36.972,24.998,36.972,24.998,36.97 +C25.334,36.777,25.657,36.56,25.964,36.327 +C25.973,36.319,25.984,36.313,25.993,36.306 +C26.611,35.831,27.169,35.285,27.65,34.671 +C27.66,34.661,27.668,34.65,27.677,34.636 +C27.9,34.353,28.103,34.054,28.292,33.743 +C28.312,33.71,28.333,33.679,28.353,33.645 +C28.738,32.989,29.046,32.284,29.261,31.538 +C29.275,31.497,29.284,31.454,29.294,31.409 +C29.384,31.087,29.452,30.757,29.507,30.419 +C29.517,30.351,29.528,30.284,29.538,30.218 +C29.589,29.837,29.622,29.452,29.626,29.062 +C28.982,29.423,28.289,29.708,27.559,29.909 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M29.629,29.058 C28.983,29.423,28.287,29.706,27.559,29.91 +C28.289,29.709,28.983,29.424,29.629,29.062 +C29.629,29.058,29.629,29.058,29.629,29.058 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M20.371,28.981 C21.045,29.376,21.771,29.686,22.54,29.901 +C21.775,29.684,21.049,29.374,20.376,28.981 +C20.433,29.016,20.491,29.049,20.548,29.083 +C20.66,29.145,20.775,29.206,20.893,29.263 +C20.775,29.206,20.66,29.146,20.548,29.083 +C20.49,29.05,20.433,29.017,20.376,28.981 +C20.375,28.981,20.372,28.981,20.371,28.979 +C20.371,28.981,20.371,28.981,20.371,28.981 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M23.907,30.177 C24.287,30.226,24.671,30.257,25.063,30.257 +C24.67,30.257,24.287,30.226,23.907,30.177 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M22.689,29.94 C23,30.022,23.314,30.086,23.638,30.135 +C23.316,30.087,23,30.024,22.689,29.94 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M25.063,30.257 C25.444,30.257,25.815,30.226,26.184,30.183 +C25.817,30.228,25.444,30.257,25.063,30.257 Z" /> + <path + android:fillColor="#009E95" + android:pathData="M26.471,30.14 C26.76,30.095,27.043,30.04,27.323,29.97 +C27.043,30.04,26.76,30.095,26.471,30.14 Z" /> + <path + android:fillColor="#000000" + android:strokeWidth="1" + android:pathData="M47.2019,37.4696 L40.5892,37.3945 L43.9606,31.7053 Z" /> +</vector>
\ No newline at end of file diff --git a/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml b/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml new file mode 100644 index 00000000..158afcf8 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/rectangle.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="#ffffffff" /> +</shape> diff --git a/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml b/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml new file mode 100644 index 00000000..c0d785a4 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/drawable/spinner_back.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <stroke android:width="1dp" android:color="#535353" /> + <solid android:color="@color/white" /> +</shape> diff --git a/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml b/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml new file mode 100755 index 00000000..726e783b --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/layout/activity_proof_view.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <LinearLayout + android:id="@+id/pagesTab" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/toolbar" + android:orientation="vertical"> + + <include layout="@layout/proof_toolbar"/> + + </LinearLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <com.artifex.mupdf.android.DocProofView + android:id="@+id/proof_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_toLeftOf="@+id/proof_color_host" + android:layout_alignParentTop="true" + android:layout_alignParentBottom="true" + android:layout_alignParentRight="true" + android:layout_alignParentLeft="true" + > + </com.artifex.mupdf.android.DocProofView> + + <LinearLayout android:orientation="vertical" + android:id="@+id/proof_color_host" + android:layout_width="wrap_content" + android:background="@drawable/color_box" + android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:layout_alignParentBottom="true" + android:layout_height="match_parent"> + + <Button + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/proof_apply_button" + android:layout_gravity="center_horizontal" + android:background="#535353" + android:textColor="@color/white" + android:textSize="18sp" + android:padding="10dp" + android:layout_margin="10dp" + android:text="APPLY"/> + + <ListView android:id="@+id/proof_color_list" + android:background="@color/transparent" + android:layout_width="100dp" + android:layout_height="wrap_content"> + + </ListView> + + </LinearLayout> + + </RelativeLayout> + +</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml index 50814a44..2dbc7897 100644 --- a/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml +++ b/platform/android/example/mupdf/src/main/res/layout/annotate_toolbar.xml @@ -140,7 +140,8 @@ <!--a divider--> <View android:layout_width="1dp" - android:paddingRight="3dp" android:paddingLeft="3dp" + android:paddingRight="3dp" + android:paddingLeft="3dp" android:layout_height="match_parent" android:background="#FF8E8F90" /> diff --git a/platform/android/example/mupdf/src/main/res/layout/doc_view.xml b/platform/android/example/mupdf/src/main/res/layout/doc_view.xml index 452d0b28..3fa9afa9 100644 --- a/platform/android/example/mupdf/src/main/res/layout/doc_view.xml +++ b/platform/android/example/mupdf/src/main/res/layout/doc_view.xml @@ -47,7 +47,10 @@ android:layout_height="match_parent"> </TabWidget> + <!--NOTE: undo and redo are "gone" for the time being.--> + <ImageButton + android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" @@ -58,6 +61,7 @@ android:layout_gravity="center_vertical" /> <ImageButton + android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" diff --git a/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml index a35d2ed9..69251b1f 100644 --- a/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml +++ b/platform/android/example/mupdf/src/main/res/layout/file_toolbar.xml @@ -154,6 +154,32 @@ android:layout_height="match_parent" android:background="#FF8E8F90" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_button" + android:src="@drawable/icon_proof" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="PROOF"/> + </LinearLayout> + </LinearLayout> </HorizontalScrollView> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml b/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml new file mode 100644 index 00000000..a15478a8 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/layout/proof_color_list_entry.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@color/transparent" + android:padding="5dp" + > + + <View + android:paddingLeft="5dp" + android:paddingRight="5dp" + android:layout_gravity="center_vertical" + android:id="@+id/proof_entry_color_swatch" + android:layout_width="32dp" + android:layout_height="32dp" + android:background="@drawable/rectangle"/> + + <CheckBox + android:layout_gravity="center_vertical" + android:id="@+id/proof_entry_checkbox" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView + android:layout_gravity="center_vertical" + android:id="@+id/proof_entry_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black" + android:textSize="20sp"/> + +</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml b/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml new file mode 100644 index 00000000..526e04e8 --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/layout/proof_dialog.xml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/layout_root" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:background="#ffe0e0e0" + android:padding="10dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="18sp" + android:textColor="#ff000000" + android:paddingBottom="15dp" + android:text="Proof Settings:"/> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="#ff000000" + android:text="Print Profile:"/> + + <RelativeLayout + android:padding="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/spinner_back"> + <Spinner + android:id="@+id/print_profile_spinner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="16sp" + android:background="@null" + android:entries="@array/proof_print_profiles" + android:minHeight="0dp" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:textSize="16sp" + android:textColor="#535353" + android:text="▼"/> + </RelativeLayout> + + <TextView + android:paddingTop="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="#ff000000" + android:text="Soft Proof Profile:"/> + + <RelativeLayout + android:padding="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/spinner_back"> + <Spinner + android:id="@+id/display_profile_spinner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="16sp" + android:background="@null" + android:entries="@array/proof_display_profiles" + android:minHeight="0dp" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:textSize="16sp" + android:textColor="#535353" + android:text="▼"/> + </RelativeLayout> + + <TextView + android:paddingTop="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="#ff000000" + android:text="Resolution:"/> + + <RelativeLayout + android:padding="10dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/spinner_back"> + <Spinner + android:id="@+id/resolution_spinner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="16sp" + android:background="@null" + android:entries="@array/proof_resolutions" + android:minHeight="0dp" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:textSize="16sp" + android:textColor="#535353" + android:text="▼"/> + </RelativeLayout> + + <LinearLayout android:orientation="horizontal" + android:paddingTop="15dp" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <View + android:layout_width="20dp" + android:layout_height="1dp" + android:layout_weight="1" + /> + + <Button + android:id="@+id/cancel_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="@style/proofButton" + android:text="CANCEL"/> + + <View + android:layout_width="20dp" + android:layout_height="1dp" + /> + + <Button + android:id="@+id/ok_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="@style/proofButton" + android:text="OK"/> + + <View + android:layout_width="20dp" + android:layout_height="1dp" + android:layout_weight="1" + /> + + + </LinearLayout> + +</LinearLayout> diff --git a/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml b/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml new file mode 100644 index 00000000..7eda855b --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/layout/proof_toolbar.xml @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="utf-8"?> + +<merge xmlns:android="http://schemas.android.com/apk/res/android"> + + <!--<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"--> + <!--android:layout_width="match_parent"--> + <!--android:layout_height="match_parent"--> + <!--android:background="@color/toolbar">--> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/toolbar" + android:paddingTop="10dp" + android:paddingBottom="10dp"> + + <ImageButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:id="@+id/proof_back_button" + android:src="@drawable/icon_back" + android:tint="@color/black" + android:background="@color/transparent" + android:layout_gravity="center_vertical"/> + + <!--a divider--> + <View + android:layout_width="1dp" + android:paddingRight="3dp" + android:paddingLeft="3dp" + android:layout_height="match_parent" + android:background="#FF8E8F90" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_first_page" + android:src="@drawable/icon_first_page" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="FIRST PAGE"/> + </LinearLayout> + + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_previous_page" + android:src="@drawable/icon_prev_page" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="PREVIOUS PAGE"/> + </LinearLayout> + + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_next_page" + android:src="@drawable/icon_next_page" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="NEXT PAGE"/> + </LinearLayout> + + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center_horizontal" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_last_page" + android:src="@drawable/icon_last_page" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="LAST PAGE"/> + </LinearLayout> + + <!--a divider--> + <View + android:layout_width="1dp" + android:paddingRight="3dp" + android:paddingLeft="3dp" + android:layout_height="match_parent" + android:background="#FF8E8F90" /> + + <TextView android:gravity="center_vertical" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:textColor="@color/black" + android:textSize="18sp" + android:id="@+id/proof_page_n_of_n"/> + + <!--this pushes things to the right--> + <View + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_weight="1" + /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingLeft="10dp" + android:paddingRight="10dp"> + + <com.artifex.mupdf.android.ToolbarButton + android:visibility="gone" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_colors_button_up" + android:src="@drawable/icon_proof_colors_up" /> + + <com.artifex.mupdf.android.ToolbarButton + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:scaleType="fitXY" + android:layout_centerVertical="true" + android:background="@drawable/toolbar_button" + android:id="@+id/proof_colors_button_down" + android:src="@drawable/icon_proof_colors_down" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:textColor="@color/black" + android:textSize="11sp" + android:text="COLORS"/> + + </LinearLayout> + + <View + android:layout_width="20dp" + android:layout_height="1dp" + /> + + + </LinearLayout> + + <!--</HorizontalScrollView>--> + +</merge> diff --git a/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml b/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml new file mode 100644 index 00000000..6e174a7f --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/layout/wait_spinner.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:background="@android:color/transparent" > + + <ProgressBar + android:id="@+id/wait_spinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> + +</RelativeLayout> diff --git a/platform/android/example/mupdf/src/main/res/values/strings.xml b/platform/android/example/mupdf/src/main/res/values/strings.xml index cc919a69..16f9c2bc 100644 --- a/platform/android/example/mupdf/src/main/res/values/strings.xml +++ b/platform/android/example/mupdf/src/main/res/values/strings.xml @@ -16,4 +16,44 @@ <string name="background">Background</string> <string name="color">Color</string> + <string name="proof">Proof</string> + + <string-array name="proof_print_profiles"> + <item>US Web Coated SWOP</item> + <item>Coated FOGRA39</item> + <item>Euroscale Coated</item> + <item>Japan Web Coated</item> + </string-array> + + <string-array name="proof_print_profile_files"> + <item>USWebCoatedSWOP.icc</item> + <item>CoatedFOGRA39.icc</item> + <item>EuroscaleCoated.icc</item> + <item>JapanWebCoated.icc</item> + </string-array> + + <string-array name="proof_display_profiles"> + <item>sRGB</item> + <item>Adobe RGB 1998</item> + <item>CIE RGB</item> + <item>Wide Gamut RGB</item> + </string-array> + + <string-array name="proof_display_profile_files"> + <item>sRGB Color Space Profile.icm</item> + <item>AdobeRGB1998.icc</item> + <item>CIERGB.icc</item> + <item>WideGamutRGB.icc</item> + </string-array> + + <string-array name="proof_resolutions"> + <item>72</item> + <item>96</item> + <item>150</item> + <item>300</item> + <item>600</item> + <item>1200</item> + <item>2400</item> + </string-array> + </resources> diff --git a/platform/android/example/mupdf/src/main/res/values/styles.xml b/platform/android/example/mupdf/src/main/res/values/styles.xml index d767ff7f..b8dc1a02 100644 --- a/platform/android/example/mupdf/src/main/res/values/styles.xml +++ b/platform/android/example/mupdf/src/main/res/values/styles.xml @@ -8,4 +8,9 @@ <item name="android:layout_margin">12dp</item> </style> + <style name="proofButton" parent="@style/Widget.AppCompat.Button.Borderless"> + <item name="android:textColor">#ffffffff</item> + <item name="android:background">#ff535353</item> + </style> + </resources> diff --git a/platform/android/example/mupdf/src/main/res/wait_spinner.xml b/platform/android/example/mupdf/src/main/res/wait_spinner.xml new file mode 100644 index 00000000..6e174a7f --- /dev/null +++ b/platform/android/example/mupdf/src/main/res/wait_spinner.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:background="@android:color/transparent" > + + <ProgressBar + android:id="@+id/wait_spinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" /> + +</RelativeLayout> diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 1b21d3c0..3427e021 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -697,6 +697,16 @@ FUN(Context_initNative)(JNIEnv *env, jclass cls) return 0; } +JNIEXPORT jint JNICALL +FUN(Context_gprfSupportedNative)(JNIEnv * env, jclass class) +{ +#ifdef FZ_ENABLE_GPRF + return JNI_TRUE; +#else + return JNI_FALSE; +#endif +} + /* Conversion functions: C to Java. These all throw fitz exceptions. */ static inline jobject to_Annotation(fz_context *ctx, JNIEnv *env, fz_annot *annot) @@ -3658,6 +3668,118 @@ FUN(Annotation_toDisplayList)(JNIEnv *env, jobject self) /* Document interface */ +static char *tmp_gproof_path(const char *path) +{ + FILE *f; + int i; + char *buf = malloc(strlen(path) + 20 + 1); + if (!buf) + return NULL; + + for (i = 0; i < 10000; i++) + { + sprintf(buf, "%s.%d.gproof", path, i); + + LOGE("Trying for %s\n", buf); + f = fopen(buf, "r"); + if (f != NULL) + { + fclose(f); + continue; + } + + f = fopen(buf, "w"); + if (f != NULL) + { + fclose(f); + break; + } + } + if (i == 10000) + { + LOGE("Failed to find temp gproof name"); + free(buf); + return NULL; + } + + LOGE("Rewritten to %s\n", buf); + return buf; +} + +JNIEXPORT jstring JNICALL +FUN(Document_proofNative)(JNIEnv *env, jobject self, jstring jCurrentPath, jstring jPrintProfile, jstring jDisplayProfile, int inResolution) +{ +#ifdef FZ_ENABLE_GPRF + + fz_context *ctx = get_context(env); + fz_document *doc = from_Document(env, self); + + char *tmp; + jstring ret; + const char *currentPath = NULL; + const char *printProfile = NULL; + const char *displayProfile = NULL; + + if (ctx == NULL || doc == NULL || jCurrentPath == NULL || jPrintProfile == NULL || jDisplayProfile == NULL) + return NULL; + + currentPath = (*env)->GetStringUTFChars(env, jCurrentPath, NULL); + if (currentPath == NULL) + { + jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); + return NULL; + } + + printProfile = (*env)->GetStringUTFChars(env, jPrintProfile, NULL); + if (printProfile == NULL) + { + jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); + (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); + return NULL; + } + + displayProfile = (*env)->GetStringUTFChars(env, jDisplayProfile, NULL); + if (displayProfile == NULL) + { + (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); + (*env)->ReleaseStringUTFChars(env, jPrintProfile, printProfile); + jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); + return NULL; + } + + tmp = tmp_gproof_path(currentPath); + if (!tmp) + { + (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); + (*env)->ReleaseStringUTFChars(env, jPrintProfile, printProfile); + (*env)->ReleaseStringUTFChars(env, jDisplayProfile, displayProfile); + return NULL; + } + + fz_try(ctx) + { + LOGE("Creating %s\n", tmp); + fz_save_gproof(ctx, currentPath, doc, tmp, inResolution, printProfile, displayProfile); + ret = (*env)->NewStringUTF(env, tmp); + } + fz_always(ctx) + { + free(tmp); + (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); + (*env)->ReleaseStringUTFChars(env, jPrintProfile, printProfile); + (*env)->ReleaseStringUTFChars(env, jDisplayProfile, displayProfile); + } + fz_catch(ctx) + { + jni_rethrow(env, ctx); + return NULL; + } + return ret; +#else + return NULL; +#endif +} + JNIEXPORT void JNICALL FUN(Document_finalize)(JNIEnv *env, jobject self) { @@ -3928,6 +4050,87 @@ FUN(Page_finalize)(JNIEnv *env, jobject self) fz_drop_page(ctx, page); } +JNIEXPORT int JNICALL +FUN(Page_countSeparations)(JNIEnv *env, jobject self) +{ + fz_context *ctx = get_context(env); + fz_page *page = from_Page(env, self); + int nSep; + + if (ctx==NULL || page==NULL) + { + LOGI("Page_countSeparations fail %x %x", (unsigned int)ctx, (unsigned int)page); + return 0; + } + + nSep = fz_count_separations_on_page(ctx, page); + + LOGI("Page_countSeparations %d", nSep); + + return nSep; +} + +JNIEXPORT void JNICALL +FUN(Page_enableSeparation)(JNIEnv *env, jobject self, int sep, jboolean enable) +{ + fz_context *ctx = get_context(env); + fz_page *page = from_Page(env, self); + int i; + + if (ctx==NULL || page==NULL) + { + LOGI("Page_enableSeparation fail %x %x", (unsigned int)ctx, (unsigned int)page); + return; + } + + fz_control_separation_on_page(ctx, page, sep, !enable); +} + +JNIEXPORT jobject JNICALL +FUN(Page_getSeparation)(JNIEnv *env, jobject self, int sep) +{ + fz_context *ctx = get_context(env); + fz_page *page = from_Page(env, self); + + const char *name; + char rgba[4]; + unsigned int bgra; + unsigned int cmyk; + jobject jname; + jclass sepClass; + jmethodID ctor; + int i; + int err; + + if (ctx==NULL || page==NULL) + { + LOGI("Page_getSeparation fail %x %x", (unsigned int)ctx, (unsigned int)page); + return 0; + } + + err = 0; + sepClass = get_class(&err, env, PKG"Separation"); + if (sepClass == NULL) + { + LOGI("Page_getSeparation failed to get class for Separation"); + return NULL; + } + + ctor = (*env)->GetMethodID(env, sepClass, "<init>", "(Ljava/lang/String;II)V"); + if (ctor == NULL) + { + LOGI("Page_getSeparation failed to get ctor for Separation"); + return NULL; + } + + /* MuPDF returns RGBA as bytes. Android wants a packed BGRA int. */ + name = fz_get_separation_on_page(ctx, page, sep, (unsigned int *)(&rgba[0]), &cmyk); + bgra = (rgba[0] << 16) | (rgba[1]<<8) | rgba[2] | (rgba[3]<<24); + jname = name ? (*env)->NewStringUTF(env, name) : NULL; + + return (*env)->NewObject(env, sepClass, ctor, jname, bgra, cmyk); +} + JNIEXPORT jobject JNICALL FUN(Page_toPixmap)(JNIEnv *env, jobject self, jobject jctm, jobject jcs, jboolean alpha) { diff --git a/platform/java/mupdf_native.h b/platform/java/mupdf_native.h index d674c715..6807d27c 100644 --- a/platform/java/mupdf_native.h +++ b/platform/java/mupdf_native.h @@ -282,6 +282,14 @@ extern "C" { JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_Context_initNative (JNIEnv *, jclass); +/* + * Class: com_artifex_mupdf_fitz_Context + * Method: gprfSupportedNative + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_Context_gprfSupportedNative + (JNIEnv *, jclass); + #ifdef __cplusplus } #endif @@ -689,6 +697,14 @@ JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_Document_isUnencryptedPDF JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Document_toPDFDocument (JNIEnv *, jobject); +/* + * Class: com_artifex_mupdf_fitz_Document + * Method: proofNative + * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_com_artifex_mupdf_fitz_Document_proofNative + (JNIEnv *, jobject, jstring, jstring, jstring, jint); + #ifdef __cplusplus } #endif @@ -2093,6 +2109,30 @@ JNIEXPORT jobjectArray JNICALL Java_com_artifex_mupdf_fitz_Page_search JNIEXPORT jbyteArray JNICALL Java_com_artifex_mupdf_fitz_Page_textAsHtml (JNIEnv *, jobject); +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: countSeparations + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_com_artifex_mupdf_fitz_Page_countSeparations + (JNIEnv *, jobject); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: getSeparation + * Signature: (I)Lcom/artifex/mupdf/fitz/Separation; + */ +JNIEXPORT jobject JNICALL Java_com_artifex_mupdf_fitz_Page_getSeparation + (JNIEnv *, jobject, jint); + +/* + * Class: com_artifex_mupdf_fitz_Page + * Method: enableSeparation + * Signature: (IZ)V + */ +JNIEXPORT void JNICALL Java_com_artifex_mupdf_fitz_Page_enableSeparation + (JNIEnv *, jobject, jint, jboolean); + #ifdef __cplusplus } #endif @@ -2419,6 +2459,17 @@ extern "C" { } #endif #endif +/* Header for class com_artifex_mupdf_fitz_Separation */ + +#ifndef _Included_com_artifex_mupdf_fitz_Separation +#define _Included_com_artifex_mupdf_fitz_Separation +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif /* Header for class com_artifex_mupdf_fitz_Shade */ #ifndef _Included_com_artifex_mupdf_fitz_Shade diff --git a/platform/java/src/com/artifex/mupdf/fitz/Context.java b/platform/java/src/com/artifex/mupdf/fitz/Context.java index 3614e65f..d8edf378 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Context.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Context.java @@ -10,6 +10,7 @@ public class Context { private static boolean inited = false; private static native int initNative(); + public static native int gprfSupportedNative(); public static void init() { if (!inited) { diff --git a/platform/java/src/com/artifex/mupdf/fitz/Document.java b/platform/java/src/com/artifex/mupdf/fitz/Document.java index b3c42e35..d619f4a2 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Document.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Document.java @@ -24,7 +24,10 @@ public class Document private native long newNativeWithBuffer(byte buffer[], String magic); // private native long newNativeWithRandomAccessFile(RandomAccessFile file, String magic); + private String mPath=null; + public String getPath() {return mPath;} public Document(String filename) { + mPath = filename; pointer = newNativeWithPath(filename); } @@ -49,4 +52,12 @@ public class Document public native boolean isUnencryptedPDF(); public native PDFDocument toPDFDocument(); + + public String makeProof (String currentPath, String printProfile, String displayProfile, int resolution) + { + String proofFile = proofNative( currentPath, printProfile, displayProfile, resolution); + return proofFile; + } + + public native String proofNative (String currentPath, String printProfile, String displayProfile, int resolution); } diff --git a/platform/java/src/com/artifex/mupdf/fitz/Page.java b/platform/java/src/com/artifex/mupdf/fitz/Page.java index b42935c5..85a3aca8 100644 --- a/platform/java/src/com/artifex/mupdf/fitz/Page.java +++ b/platform/java/src/com/artifex/mupdf/fitz/Page.java @@ -38,4 +38,9 @@ public class Page public native Rect[] search(String needle); public native byte[] textAsHtml(); + + public native int countSeparations(); + public native Separation getSeparation(int index); + public native void enableSeparation(int index, boolean enabled); + } diff --git a/platform/java/src/com/artifex/mupdf/fitz/Separation.java b/platform/java/src/com/artifex/mupdf/fitz/Separation.java new file mode 100644 index 00000000..5da7157b --- /dev/null +++ b/platform/java/src/com/artifex/mupdf/fitz/Separation.java @@ -0,0 +1,15 @@ +package com.artifex.mupdf.fitz; + +public class Separation +{ + public String name; + public int rgba; + public int cmyk; + + public Separation(String name, int rgba, int cmyk) + { + this.name = name; + this.rgba = rgba; + this.cmyk = cmyk; + } +} |