本文整理汇总了Java中com.edmodo.cropper.cropwindow.edge.Edge.adjustCoordinate方法的典型用法代码示例。如果您正苦于以下问题:Java Edge.adjustCoordinate方法的具体用法?Java Edge.adjustCoordinate怎么用?Java Edge.adjustCoordinate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.edmodo.cropper.cropwindow.edge.Edge
的用法示例。
在下文中一共展示了Edge.adjustCoordinate方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateCropWindow
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
/**
* Updates the crop window by directly setting the Edge coordinates.
*
* @param x the new x-coordinate of this handle
* @param y the new y-coordinate of this handle
* @param imageRect the bounding rectangle of the image
* @param parentView the parent View containing the image
* @param snapRadius the maximum distance (in pixels) at which the crop
* window should snap to the image
*/
void updateCropWindow(float x,
float y,
Rect imageRect,
float snapRadius) {
final EdgePair activeEdges = getActiveEdges();
final Edge primaryEdge = activeEdges.primary;
final Edge secondaryEdge = activeEdges.secondary;
if (primaryEdge != null)
primaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
if (secondaryEdge != null)
secondaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
}
示例2: updateCropWindow
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
@Override
void updateCropWindow(float x,
float y,
float targetAspectRatio,
Rect imageRect,
float snapRadius) {
final EdgePair activeEdges = getActiveEdges(x, y, targetAspectRatio);
final Edge primaryEdge = activeEdges.primary;
final Edge secondaryEdge = activeEdges.secondary;
primaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, targetAspectRatio);
secondaryEdge.adjustCoordinate(targetAspectRatio);
if (secondaryEdge.isOutsideMargin(imageRect, snapRadius)) {
secondaryEdge.snapToRect(imageRect);
primaryEdge.adjustCoordinate(targetAspectRatio);
}
}
示例3: updateCropWindow
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
/**
* Updates the crop window by directly setting the Edge coordinates.
*
* @param x the new x-coordinate of this handle
* @param y the new y-coordinate of this handle
* @param imageRect the bounding rectangle of the image
* @param parentView the parent View containing the image
* @param snapRadius the maximum distance (in pixels) at which the crop
* window should snap to the image
*/
void updateCropWindow(float x,
float y,
Rect imageRect,
float snapRadius) {
final EdgePair activeEdges = getActiveEdges();
final Edge primaryEdge = activeEdges.primary;
final Edge secondaryEdge = activeEdges.secondary;
if (primaryEdge != null)
primaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
if (secondaryEdge != null)
secondaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
}
示例4: updateCropWindow
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
/**
* Updates the crop window by directly setting the Edge coordinates.
*
* @param x the new x-coordinate of this handle
* @param y the new y-coordinate of this handle
* @param imageRect the bounding rectangle of the image
* @param snapRadius the maximum distance (in pixels) at which the crop window should snap to
* the image
*/
void updateCropWindow(float x,
float y,
@NonNull RectF imageRect,
float snapRadius) {
final EdgePair activeEdges = getActiveEdges();
final Edge primaryEdge = activeEdges.primary;
final Edge secondaryEdge = activeEdges.secondary;
if (primaryEdge != null)
primaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
if (secondaryEdge != null)
secondaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, UNFIXED_ASPECT_RATIO_CONSTANT);
}
示例5: updateCropWindow
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
@Override
void updateCropWindow(float x,
float y,
float targetAspectRatio,
@NonNull RectF imageRect,
float snapRadius) {
final EdgePair activeEdges = getActiveEdges(x, y, targetAspectRatio);
final Edge primaryEdge = activeEdges.primary;
final Edge secondaryEdge = activeEdges.secondary;
primaryEdge.adjustCoordinate(x, y, imageRect, snapRadius, targetAspectRatio);
secondaryEdge.adjustCoordinate(targetAspectRatio);
if (secondaryEdge.isOutsideMargin(imageRect, snapRadius)) {
secondaryEdge.snapToRect(imageRect);
primaryEdge.adjustCoordinate(targetAspectRatio);
}
}
示例6: a
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
void a(float f, float f1, float f2, Rect rect, float f3)
{
EdgePair edgepair = a(f, f1, f2);
Edge edge = edgepair.primary;
Edge edge1 = edgepair.secondary;
edge.adjustCoordinate(f, f1, rect, f3, f2);
edge1.adjustCoordinate(f2);
if (edge1.isOutsideMargin(rect, f3))
{
edge1.snapToRect(rect);
edge.adjustCoordinate(f2);
}
}
示例7: a
import com.edmodo.cropper.cropwindow.edge.Edge; //导入方法依赖的package包/类
void a(float f, float f1, Rect rect, float f2)
{
EdgePair edgepair = a();
Edge edge = edgepair.primary;
Edge edge1 = edgepair.secondary;
if (edge != null)
{
edge.adjustCoordinate(f, f1, rect, f2, 1.0F);
}
if (edge1 != null)
{
edge1.adjustCoordinate(f, f1, rect, f2, 1.0F);
}
}