本文整理汇总了Java中com.edmodo.cropper.util.PaintUtil类的典型用法代码示例。如果您正苦于以下问题:Java PaintUtil类的具体用法?Java PaintUtil怎么用?Java PaintUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PaintUtil类属于com.edmodo.cropper.util包,在下文中一共展示了PaintUtil类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import com.edmodo.cropper.util.PaintUtil; //导入依赖的package包/类
private void init(@NonNull Context context, @Nullable AttributeSet attrs) {
final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.CropImageView, 0, 0);
mGuidelinesMode = typedArray.getInteger(R.styleable.CropImageView_guidelines, 1);
mFixAspectRatio = typedArray.getBoolean(R.styleable.CropImageView_fixAspectRatio, false);
mAspectRatioX = typedArray.getInteger(R.styleable.CropImageView_aspectRatioX, 1);
mAspectRatioY = typedArray.getInteger(R.styleable.CropImageView_aspectRatioY, 1);
typedArray.recycle();
final Resources resources = context.getResources();
mBorderPaint = PaintUtil.newBorderPaint(resources);
mGuidelinePaint = PaintUtil.newGuidelinePaint(resources);
mSurroundingAreaOverlayPaint = PaintUtil.newSurroundingAreaOverlayPaint(resources);
mCornerPaint = PaintUtil.newCornerPaint(resources);
mHandleRadius = resources.getDimension(R.dimen.target_radius);
mSnapRadius = resources.getDimension(R.dimen.snap_radius);
mBorderThickness = resources.getDimension(R.dimen.border_thickness);
mCornerThickness = resources.getDimension(R.dimen.corner_thickness);
mCornerLength = resources.getDimension(R.dimen.corner_length);
}
开发者ID:edmodo,项目名称:cropper,代码行数:23,代码来源:CropImageView.java
示例2: init
import com.edmodo.cropper.util.PaintUtil; //导入依赖的package包/类
private void init(Context context) {
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
mHandleRadius = HandleUtil.getTargetRadius(context);
mSnapRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
SNAP_RADIUS_DP,
displayMetrics);
mBorderPaint = PaintUtil.newBorderPaint(context);
mGuidelinePaint = PaintUtil.newGuidelinePaint();
mBackgroundPaint = PaintUtil.newBackgroundPaint(context);
mCornerPaint = PaintUtil.newCornerPaint(context);
// Sets the values for the corner sizes
mCornerOffset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_OFFSET_DP,
displayMetrics);
mCornerExtension = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_EXTENSION_DP,
displayMetrics);
mCornerLength = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_LENGTH_DP,
displayMetrics);
// Sets guidelines to default until specified otherwise
mGuidelines = CropImageView.DEFAULT_GUIDELINES;
}
开发者ID:g82,项目名称:open-mygirl-android-gradle,代码行数:30,代码来源:CropOverlayView.java
示例3: init
import com.edmodo.cropper.util.PaintUtil; //导入依赖的package包/类
private void init(Context context) {
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
mHandleRadius = HandleUtil.getTargetRadius(context);
mSnapRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
SNAP_RADIUS_DP,
displayMetrics);
mBorderPaint = PaintUtil.newBorderPaint(context);
mGuidelinePaint = PaintUtil.newGuidelinePaint();
mBackgroundPaint = PaintUtil.newBackgroundPaint(context);
mCornerPaint = PaintUtil.newCornerPaint(context);
// Sets the values for the corner sizes
mCornerOffset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_OFFSET_DP,
displayMetrics);
mCornerExtension = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_EXTENSION_DP,
displayMetrics);
mCornerLength = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
DEFAULT_CORNER_LENGTH_DP,
displayMetrics);
// Sets guidelines to default until specified otherwise
mGuidelines = CropImageView.DEFAULT_GUIDELINES;
}
开发者ID:wangeason,项目名称:PhotoViewCropper,代码行数:30,代码来源:CropOverlayView.java
示例4: a
import com.edmodo.cropper.util.PaintUtil; //导入依赖的package包/类
private void a(Context context)
{
F = 1;
android.util.DisplayMetrics displaymetrics = context.getResources().getDisplayMetrics();
s = HandleUtil.getTargetRadius(context);
t = TypedValue.applyDimension(1, 6F, displaymetrics);
n = PaintUtil.newBorderPaint(context);
o = PaintUtil.newGuidelinePaint();
q = PaintUtil.newBackgroundPaint(context);
p = PaintUtil.newCornerPaint(context);
D = -TypedValue.applyDimension(1, d, displaymetrics);
C = -D;
E = TypedValue.applyDimension(1, 20F, displaymetrics);
A = 1;
}
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:16,代码来源:CropOverlayView.java
注:本文中的com.edmodo.cropper.util.PaintUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论