public class TuEditPaintFragment extends TuEditPaintFragmentBase implements PaintBarView.PaintBarViewDelegate
限定符和类型 | 类和说明 |
---|---|
static interface |
TuEditPaintFragment.TuEditPaintFragmentDelegate
图片编辑涂鸦控制器委托
|
限定符和类型 | 字段和说明 |
---|---|
protected android.view.View.OnClickListener |
mButtonClickListener
按钮点击事件
|
protected android.view.View.OnTouchListener |
mOnTouchListener
触摸事件
|
mScreenSizeScale
permissionAlertDelegate
构造器和说明 |
---|
TuEditPaintFragment()
图片编辑涂鸦控制器
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
asyncLoadImageCompleted(android.graphics.Bitmap image)
异步加载图片完成
|
protected boolean |
asyncNotifyProcessing(TuSdkResult result)
异步通知处理结果
|
protected void |
dispatcherViewClick(android.view.View v)
分发视图点击事件
|
java.util.List<java.lang.String> |
getBrushGroup() |
float |
getBrushScale() |
TuSdkImageButton |
getCancelButton()
取消按钮
|
protected java.util.List<PaintData> |
getColorList() |
TuSdkImageButton |
getCompleteButton()
完成按钮
|
BrushSize.SizeType |
getDefaultBrushSize() |
TuEditPaintFragment.TuEditPaintFragmentDelegate |
getDelegate() |
static int |
getLayoutId() |
int |
getMaxUndoCount() |
float |
getMinDistance() |
TuSdkImageButton |
getOriginalButton()
查看原图按钮
|
int |
getPaintBarCellLayoutId()
笔刷列表行视图布局资源ID
|
int |
getPaintBarCellWidth() |
int |
getPaintBarHeight() |
PaintBarView |
getPaintBarView() |
PaintDrawView |
getPaintDrawView() |
TuSdkImageButton |
getRedoButton()
重做按钮
|
TuBrushSizeAnimView |
getSizeAnimView() |
TuSdkImageButton |
getUndoButton()
撤销按钮
|
protected void |
handleOriginalButton(boolean isDown) |
boolean |
isSaveLastBrush() |
protected void |
loadView(android.view.ViewGroup view)
加载视图
|
protected void |
notifyProcessing(TuSdkResult result)
通知处理结果
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
创建视图
|
void |
onPaintBarViewSelected(PaintBarView view,
PaintData data)
选中一个画笔数据
|
void |
onPaintSizeButtonClick()
画笔大小切换按钮点击
|
void |
onRefreshStepStatesWithHistories(int undoCount,
int redoCount)
用户操作导致撤销/重做数据发生变化
|
void |
setBrushGroup(java.util.List<java.lang.String> mBrushGroup) |
void |
setBrushScale(float mBrushScale) |
protected void |
setBrushSize(BrushSize.SizeType mBrushSize) |
void |
setDefaultBrushSize(BrushSize.SizeType mDefaultBrushSize) |
void |
setDelegate(TuEditPaintFragment.TuEditPaintFragmentDelegate mDelegate) |
void |
setMaxUndoCount(int mMaxUndoCount) |
void |
setMinDistance(float mMinDistance) |
void |
setPaintBarCellLayoutId(int mPaintBarCellLayoutId)
笔刷列表行视图布局资源ID
|
void |
setPaintBarCellWidth(int mPaintBarCellWidth) |
void |
setPaintBarCellWidthDP(int mPaintBarCellWidthDP) |
void |
setPaintBarHeight(int mPaintBarHeight) |
void |
setPaintBarHeightDP(int mPaintBarHeightDP) |
void |
setSaveLastBrush(boolean mSaveLastBrush) |
protected void |
viewDidLoad(android.view.ViewGroup view)
初始化视图
|
asyncEditWithResult, handleBackButton, handleCompleteButton, handleOrigianlButtonDown, handleOrigianlButtonUp, handleRedoButton, handleUndoButton, onDestroyView, selectPaint, startSizeAnimation
asyncLoadImage, getCuterImage, getCuterImage, getImage, getImageDisplaySize, getImageSqlInfo, getPreview, getTempFilePath, handleTest, isAutoRemoveTemp, isShowResultPreview, loadImageWithThread, loadOrginImage, postProcessWithImage, preProcessWithImage, processingImage, setAutoRemoveTemp, setImage, setImageSqlInfo, setShowResultPreview, setTempFilePath, showResultPreview
addWaterMarkToImage, asyncProcessingIfNeedSave, backUIThreadNotifyProcessing, canSaveFile, getOutputCompress, getSaveToAlbumName, getWaterMarkOption, isSaveToAlbum, isSaveToTemp, saveToAlbum, saveToTemp, setOutputCompress, setSaveToAlbum, setSaveToAlbumName, setSaveToTemp, setWaterMarkOption
getErrorListener, getRequestPermissionCode, getRequiredPermissions, hasRequiredPermission, notifyError, onPermissionGrantedResult, onRequestPermissionsResult, requestRequiredPermissions, setErrorListener
alert, alert, filpModalNavigationActivity, filpModalNavigationActivity, hubDismiss, hubDismissRightNow, hubError, hubError, hubStatus, hubStatus, hubSuccess, hubSuccess, initCreateView, onDetach, presentActivity, presentModalNavigationActivity, presentModalNavigationActivity, presentModalNavigationActivity, pushModalNavigationActivity, pushModalNavigationActivity, setNavLeftButton, setNavLeftButton, setNavLeftButton, setNavLeftHighLightButton, setNavLeftHighLightButton, setNavRightButton, setNavRightButton, setNavRightButton, setNavRightHighLightButton, setNavRightHighLightButton
addOrientationListener, backStackEntryCount, bindSoftInputEvent, dismissActivity, dismissActivityWithAnim, dismissActivityWithAnim, equalViewIds, filpModalNavigationActivity, getDismissAnimType, getNavButton, getOriginFragment, getResColor, getResString, getResString, getResString, getResString, getRootView, getRootViewLayoutId, getSdkActivity, getTitle, getViewById, getViewById, getViewId, isBackButtonShowed, isFragmentPause, isFullScreen, isSupportSlideBack, navigatorBarBackAction, navigatorBarCancelAction, navigatorBarHeight, navigatorBarLeftAction, navigatorBarLoaded, navigatorBarRightAction, navSearchViewSearch, navSearchViewSetDelegate, navSegmentedAddTexts, navSegmentedAddTexts, navSegmentedSetDelegate, navSegmentedSetected, onAttach, onBackForSlide, onBackPressed, onCreateAnimation, onDestroy, onFragmentAnimationEnd, onKeyUp, onNavigatorBarButtonClicked, onOrientationChanged, onPause, onPauseFragment, onPreDraw, onRefreshData, onResume, onResumeFragment, popFragment, popFragment, popFragmentRoot, presentActivity, presentActivity, presentModalNavigationActivity, presentModalNavigationActivity, presentModalNavigationActivity, pushFragment, refreshOriginFragment, replaceFragment, runOnUiThread, setIsSupportSlideBack, setNavigatorBarId, setNavigatorBarOnButtom, setNavLeftButton, setNavLeftButton, setNavRightButton, setNavRightButton, setOriginFragment, setRequestedOrientation, setRootViewLayoutId, setTitle, setTitle, showBackButton, showNavigatorBar, showView, showViewIn, wantFullScreen
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireContext, requireFragmentManager, requireHost, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
protected android.view.View.OnClickListener mButtonClickListener
protected android.view.View.OnTouchListener mOnTouchListener
public static int getLayoutId()
public TuEditPaintFragment.TuEditPaintFragmentDelegate getDelegate()
public void setDelegate(TuEditPaintFragment.TuEditPaintFragmentDelegate mDelegate)
mDelegate
- 图片编辑涂鸦控制器委托public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
TuFragment
onCreateView
在类中 TuFragment
protected void notifyProcessing(TuSdkResult result)
notifyProcessing
在类中 TuEditPaintFragmentBase
result
- SDK处理结果protected boolean asyncNotifyProcessing(TuSdkResult result)
asyncNotifyProcessing
在类中 TuEditPaintFragmentBase
result
- SDK处理结果public int getPaintBarCellWidth()
public void setPaintBarCellWidth(int mPaintBarCellWidth)
mPaintBarCellWidth
- 行视图宽度public void setPaintBarCellWidthDP(int mPaintBarCellWidthDP)
mPaintBarCellWidthDP
- 行视图宽度 (单位:DP)public int getPaintBarCellLayoutId()
笔刷列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_brush_bar_item_cell,如需自定义请继承自
BrushBarItemCellBase){@link org.lasque.tusdk.modules.view.widget.paintdraw.PaintDrawBarItemCellBase}
public void setPaintBarCellLayoutId(int mPaintBarCellLayoutId)
笔刷列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_brush_bar_item_cell,如需自定义请继承自
BrushBarItemCellBase){@link org.lasque.tusdk.modules.view.widget.paintdraw.PaintDrawBarItemCellBase}
public int getPaintBarHeight()
public void setPaintBarHeight(int mPaintBarHeight)
mPaintBarHeight
- 笔刷栏高度public void setPaintBarHeightDP(int mPaintBarHeightDP)
mPaintBarHeightDP
- 笔刷栏高度 (单位:DP)public boolean isSaveLastBrush()
public void setSaveLastBrush(boolean mSaveLastBrush)
mSaveLastBrush
- 记住用户最后一次使用的笔刷public BrushSize.SizeType getDefaultBrushSize()
BrushSize.SizeType.MediumBrush
,中等粗细)public void setDefaultBrushSize(BrushSize.SizeType mDefaultBrushSize)
mDefaultBrushSize
- 默认的笔刷大小 (默认: BrushSize.SizeType.MediumBrush
,中等粗细)public int getMaxUndoCount()
public void setMaxUndoCount(int mMaxUndoCount)
mMaxUndoCount
- 允许撤销的次数 (默认: 5)public java.util.List<java.lang.String> getBrushGroup()
public void setBrushGroup(java.util.List<java.lang.String> mBrushGroup)
mBrushGroup
- 需要显示的笔刷组 (如果为空将显示所有自定义笔刷)public float getMinDistance()
public void setMinDistance(float mMinDistance)
public float getBrushScale()
public void setBrushScale(float mBrushScale)
public PaintDrawView getPaintDrawView()
getPaintDrawView
在类中 TuEditPaintFragmentBase
public TuBrushSizeAnimView getSizeAnimView()
getSizeAnimView
在类中 TuEditPaintFragmentBase
protected java.util.List<PaintData> getColorList()
getColorList
在类中 TuEditPaintFragmentBase
public PaintBarView getPaintBarView()
public TuSdkImageButton getCancelButton()
public TuSdkImageButton getCompleteButton()
public TuSdkImageButton getUndoButton()
public TuSdkImageButton getRedoButton()
public TuSdkImageButton getOriginalButton()
public void onRefreshStepStatesWithHistories(int undoCount, int redoCount)
onRefreshStepStatesWithHistories
在接口中 PaintDrawView.PaintDrawViewDelagate
onRefreshStepStatesWithHistories
在类中 TuEditPaintFragmentBase
undoCount
- 可以撤销的次数redoCount
- 可以重做的次数protected void dispatcherViewClick(android.view.View v)
protected void handleOriginalButton(boolean isDown)
isDown
- 是否按下显示原图按钮protected void loadView(android.view.ViewGroup view)
TuSdkFragment
loadView
在类中 TuEditPaintFragmentBase
protected void viewDidLoad(android.view.ViewGroup view)
TuSdkFragment
viewDidLoad
在类中 TuEditPaintFragmentBase
protected void asyncLoadImageCompleted(android.graphics.Bitmap image)
TuImageResultFragment
asyncLoadImageCompleted
在类中 TuImageResultFragment
image
- 异步加载图片完成protected void setBrushSize(BrushSize.SizeType mBrushSize)
mBrushSize
- 设置笔刷大小public void onPaintBarViewSelected(PaintBarView view, PaintData data)
PaintBarView.PaintBarViewDelegate
onPaintBarViewSelected
在接口中 PaintBarView.PaintBarViewDelegate
view
- 画笔栏视图data
- 画笔数据public void onPaintSizeButtonClick()