Home
last modified time | relevance | path

Searched refs:PointF (Results 1 – 25 of 46) sorted by relevance

12

/external/libmojo/ui/gfx/geometry/
Dpoint_f.h19 class GFX_EXPORT PointF {
21 constexpr PointF() : x_(0.f), y_(0.f) {} in PointF() function
22 constexpr PointF(float x, float y) : x_(x), y_(y) {} in PointF() function
24 constexpr explicit PointF(const Point& p) in PointF() function
25 : PointF(static_cast<float>(p.x()), static_cast<float>(p.y())) {} in PointF()
52 void SetToMin(const PointF& other);
53 void SetToMax(const PointF& other);
65 bool operator<(const PointF& rhs) const {
85 inline bool operator==(const PointF& lhs, const PointF& rhs) {
89 inline bool operator!=(const PointF& lhs, const PointF& rhs) {
[all …]
Dpoint_f.cc11 void PointF::SetToMin(const PointF& other) { in SetToMin()
16 void PointF::SetToMax(const PointF& other) { in SetToMax()
21 std::string PointF::ToString() const { in ToString()
25 PointF ScalePoint(const PointF& p, float x_scale, float y_scale) { in ScalePoint()
26 PointF scaled_p(p); in ScalePoint()
Drect_f.h33 constexpr RectF(const PointF& origin, const SizeF& size) in RectF()
60 constexpr const PointF& origin() const { return origin_; } in origin()
61 void set_origin(const PointF& origin) { origin_ = origin; } in set_origin()
69 constexpr PointF top_right() const { return PointF(right(), y()); } in top_right()
70 constexpr PointF bottom_left() const { return PointF(x(), bottom()); } in bottom_left()
71 constexpr PointF bottom_right() const { return PointF(right(), bottom()); } in bottom_right()
116 bool Contains(const PointF& point) const { in Contains()
146 PointF CenterPoint() const;
161 float ManhattanDistanceToPoint(const PointF& point) const;
188 PointF origin_;
[all …]
Dpoint.cc72 return ToCeiledPoint(ScalePoint(gfx::PointF(point), x_scale, y_scale)); in ScaleToCeiledPoint()
78 return ToCeiledPoint(ScalePoint(gfx::PointF(point), scale, scale)); in ScaleToCeiledPoint()
84 return ToFlooredPoint(ScalePoint(gfx::PointF(point), x_scale, y_scale)); in ScaleToFlooredPoint()
90 return ToFlooredPoint(ScalePoint(gfx::PointF(point), scale, scale)); in ScaleToFlooredPoint()
96 return ToRoundedPoint(ScalePoint(gfx::PointF(point), x_scale, y_scale)); in ScaleToRoundedPoint()
102 return ToRoundedPoint(ScalePoint(gfx::PointF(point), scale, scale)); in ScaleToRoundedPoint()
Dpoint_conversions.h14 GFX_EXPORT Point ToFlooredPoint(const PointF& point);
17 GFX_EXPORT Point ToCeiledPoint(const PointF& point);
20 GFX_EXPORT Point ToRoundedPoint(const PointF& point);
Dpoint_conversions.cc11 Point ToFlooredPoint(const PointF& point) { in ToFlooredPoint()
17 Point ToCeiledPoint(const PointF& point) { in ToCeiledPoint()
23 Point ToRoundedPoint(const PointF& point) { in ToRoundedPoint()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowMatrixTest.java8 import android.graphics.PointF;
211 assertPointsEqual(mapPoint(matrix, 1.0f, 1.0f), new PointF(3.0f, 3.0f)); in testSetTranslate()
213 assertPointsEqual(mapPoint(matrix, 1.0f, 1.0f), new PointF(-1.0f, -1.0f)); in testSetTranslate()
220 assertPointsEqual(mapPoint(matrix1, 1.0f, 1.0f), new PointF(2.0f, 2.0f)); in testPostTranslate()
223 assertPointsEqual(mapPoint(matrix1, 1.0f, 1.0f), new PointF(4.0f, 4.0f)); in testPostTranslate()
228 assertPointsEqual(mapPoint(matrix2, 1.0f, 1.0f), new PointF(-3.0f, 12.0f)); in testPostTranslate()
235 assertPointsEqual(mapPoint(matrix1, 1.0f, 1.0f), new PointF(2.0f, 2.0f)); in testPreTranslate()
238 assertPointsEqual(mapPoint(matrix1, 1.0f, 1.0f), new PointF(4.0f, 4.0f)); in testPreTranslate()
243 assertPointsEqual(mapPoint(matrix2, 1.0f, 1.0f), new PointF(-8.0f, 22.0f)); in testPreTranslate()
250 assertPointsEqual(mapPoint(matrix, 1.0f, 1.0f), new PointF(2.0f, 2.0f)); in testSetScale()
[all …]
/external/subsampling-scale-image-view/sample/src/main/java/com/davemorrissey/labs/subscaleview/test/extension/views/
DFreehandView.java21 private final PointF vPoint = new PointF();
22 private PointF vPrev = new PointF();
23 private PointF vPrevious;
24 private PointF vStart;
29 private List<PointF> sPoints;
61 vStart = new PointF(event.getX(), event.getY()); in onTouchEvent()
62 vPrevious = new PointF(event.getX(), event.getY()); in onTouchEvent()
69 PointF sCurrentF = viewToSourceCoord(event.getX(), event.getY()); in onTouchEvent()
70 PointF sCurrent = new PointF(sCurrentF.x, sCurrentF.y); in onTouchEvent()
71PointF sStart = vStart == null ? null : new PointF(viewToSourceCoord(vStart).x, viewToSourceCoord(… in onTouchEvent()
DPinView.java13 private final PointF vPin = new PointF();
14 private PointF sPin;
26 public void setPin(PointF sPin) { in setPin()
DCircleView.java14 private final PointF sCenter = new PointF();
15 private final PointF vCenter = new PointF();
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/pie/
DPieRenderer.java55 PointF origin = new PointF(plotArea.centerX(), plotArea.centerY()); in onRender()
99 PointF r1Outer = calculateLineEnd(cx, cy, rad, startAngle); in drawSegment()
100 PointF r1Inner = calculateLineEnd(cx, cy, donutSizePx, startAngle); in drawSegment()
103 PointF r2Outer = calculateLineEnd(cx, cy, rad, startAngle + sweep); in drawSegment()
104 PointF r2Inner = calculateLineEnd(cx, cy, donutSizePx, startAngle + sweep); in drawSegment()
152 PointF labelOrigin = calculateLineEnd(cx, cy, in drawSegment()
161 protected void drawSegmentLabel(Canvas canvas, PointF origin, in drawSegmentLabel()
196 private PointF calculateLineEnd(float x, float y, float rad, float deg) { in calculateLineEnd()
197 return calculateLineEnd(new PointF(x, y), rad, deg); in calculateLineEnd()
200 private PointF calculateLineEnd(PointF origin, float rad, float deg) { in calculateLineEnd()
[all …]
/external/subsampling-scale-image-view/library/src/main/java/com/davemorrissey/labs/subscaleview/
DSubsamplingScaleImageView.java14 import android.graphics.PointF;
198 private PointF vTranslate;
199 private PointF vTranslateStart;
200 private PointF vTranslateBefore;
204 private PointF sPendingCenter;
205 private PointF sRequestedCenter;
234 private PointF vCenterStart;
241 private PointF quickScaleVLastPoint;
242 private PointF quickScaleSCenter;
243 private PointF quickScaleVStart;
[all …]
DImageViewState.java3 import android.graphics.PointF;
21 public ImageViewState(float scale, PointF center, int orientation) { in ImageViewState()
32 public PointF getCenter() { in getCenter()
33 return new PointF(centerX, centerY); in getCenter()
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/util/
DPixelUtils.java20 import android.graphics.PointF;
52 public static PointF add(PointF lhs, PointF rhs) { in add()
53 return new PointF(lhs.x + rhs.x, lhs.y + rhs.y); in add()
56 public static PointF sub(PointF lhs, PointF rhs) { in sub()
57 return new PointF(lhs.x - rhs.x, lhs.y - rhs.y); in sub()
DValPixConverter.java19 import android.graphics.PointF;
91 …public static PointF valToPix(Number x, Number y, RectF plotArea, Number minX, Number maxX, Number… in valToPix()
94 return new PointF(pixX, pixY); in valToPix()
/external/androidplot/AndroidPlot-Core/src/test/java/com/androidplot/mock/
DMockPixelUtils.java4 import android.graphics.PointF;
19 public static PointF sub(PointF lhs, PointF rhs) { in sub()
20 return new PointF(0, 0); in sub()
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/
DLineAndPointRenderer.java73 protected void appendToPath(Path path, PointF thisPoint, PointF lastPoint) { in appendToPath()
80 PointF thisPoint; in drawSeries()
81 PointF lastPoint = null; in drawSeries()
82 PointF firstPoint = null; in drawSeries()
87 … ArrayList<Pair<PointF, Integer>> points = new ArrayList<Pair<PointF, Integer>>(series.size()); in drawSeries()
101 points.add(new Pair<PointF, Integer>(thisPoint, i)); in drawSeries()
139 for (Pair<PointF, Integer> p : points) { in drawSeries()
155 …protected void renderPath(Canvas canvas, RectF plotArea, Path path, PointF firstPoint, PointF last… in renderPath()
DBezierLineAndPointRenderer.java20 import android.graphics.PointF;
32 protected void appendToPath(Path path, PointF thisPoint, PointF lastPoint) { in appendToPath()
36 PointF mid = new PointF(); in appendToPath()
DXYPlotZoomPan.java4 import android.graphics.PointF;
30 private PointF firstFingerPos;
232 firstFingerPos = new PointF(event.getX(), event.getY()); in onTouch()
263 final PointF oldFirstFinger = firstFingerPos; //save old position of finger in pan()
264 … firstFingerPos = new PointF(motionEvent.getX(), motionEvent.getY()); //update finger position in pan()
265 PointF newX = new PointF(); in pan()
283 private void calculatePan(final PointF oldFirstFinger, PointF newX, final boolean horizontal) { in calculatePan()
336 PointF newX = new PointF(); in zoom()
354 private void calculateZoom(float scale, PointF newX, final boolean horizontal) { in calculateZoom()
DStepRenderer.java20 import android.graphics.PointF;
34 protected void appendToPath(Path path, PointF thisPoint, PointF lastPoint) { in appendToPath()
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/ui/widget/
DWidget.java115 public boolean containsPoint(PointF point) { in containsPoint()
260 PointF coords = getElementCoordinates(elementHeight, in refreshLayout()
277 …public PointF getElementCoordinates(float height, float width, RectF viewRect, PositionMetrics met… in getElementCoordinates()
280 PointF point = new PointF(x, y); in getElementCoordinates()
284 public static PointF getAnchorOffset(float width, float height, AnchorPosition anchorPosition) { in getAnchorOffset()
285 PointF point = new PointF(); in getAnchorOffset()
319 public static PointF getAnchorCoordinates(RectF widgetRect, AnchorPosition anchorPosition) { in getAnchorCoordinates()
320 return PixelUtils.add(new PointF(widgetRect.left, widgetRect.top), in getAnchorCoordinates()
324 …public static PointF getAnchorCoordinates(float x, float y, float width, float height, AnchorPosit… in getAnchorCoordinates()
/external/androidplot/Examples/DemoApp/src/com/androidplot/demos/
DTouchZoomExampleActivity.java25 import android.graphics.PointF;
48 private PointF minXY;
49 private PointF maxXY;
101 minXY = new PointF(mySimpleXYPlot.getCalculatedMinX().floatValue(), in onCreate()
103 maxXY = new PointF(mySimpleXYPlot.getCalculatedMaxX().floatValue(), in onCreate()
120 PointF firstFinger;
128 firstFinger = new PointF(event.getX(), event.getY()); in onTouch()
145 PointF oldFirstFinger = firstFinger; in onTouch()
146 firstFinger = new PointF(event.getX(), event.getY()); in onTouch()
/external/subsampling-scale-image-view/sample/src/main/java/com/davemorrissey/labs/subscaleview/test/eventhandlingadvanced/
DAdvancedEventHandlingActivity.java3 import android.graphics.PointF;
41 PointF sCoord = imageView.viewToSourceCoord(e.getX(), e.getY()); in onCreate()
51 PointF sCoord = imageView.viewToSourceCoord(e.getX(), e.getY()); in onCreate()
60 PointF sCoord = imageView.viewToSourceCoord(e.getX(), e.getY()); in onCreate()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowMatrix.java4 import android.graphics.PointF;
283 public PointF mapPoint(float x, float y) { in mapPoint()
284 return mMatrix.transform(new PointF(x, y)); in mapPoint()
287 public PointF mapPoint(PointF point) { in mapPoint()
293 final PointF leftTop = mapPoint(source.left, source.top); in mapRect()
294 final PointF rightBottom = mapPoint(source.right, source.bottom); in mapRect()
485 public PointF transform(PointF point) { in transform()
486 return new PointF( in transform()
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowPointF.java4 import android.graphics.PointF;
15 @Implements(PointF.class)
17 @RealObject private PointF realPointF;

12