gpt4 book ai didi

com.androidplot.xy.YValueMarker类的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 12:07:31 27 4
gpt4 key购买 nike

本文整理了Java中com.androidplot.xy.YValueMarker类的一些代码示例,展示了YValueMarker类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YValueMarker类的具体详情如下:
包路径:com.androidplot.xy.YValueMarker
类名称:YValueMarker

YValueMarker介绍

暂无

代码示例

代码示例来源:origin: halfhp/androidplot

YValueMarker fenwayLfMarker = new YValueMarker(
    380,                                        // y-val to mark
    "Fenway Park LF Wall",                      // marker label
YValueMarker attRfMarker = new YValueMarker(
    309,                                        // y-val to mark
    "ATT Park RF Wall",                         // marker label
fenwayLfMarker.getTextPaint().setTextSize(PixelUtils.dpToPix(14));
attRfMarker.getTextPaint().setTextSize(PixelUtils.dpToPix(14));
fenwayLfMarker.getLinePaint().setPathEffect(dpe);
attRfMarker.getLinePaint().setPathEffect(dpe);

代码示例来源:origin: halfhp/androidplot

protected void drawMarkers(Canvas canvas) {
  if (plot.getYValueMarkers() != null && plot.getYValueMarkers().size() > 0) {
    for (YValueMarker marker : plot.getYValueMarkers()) {
      if (marker.getValue() != null) {
        float yPix = (float) plot.getBounds().yRegion
            .transform(marker.getValue()
                .doubleValue(), gridRect.top, gridRect.bottom, true);
        canvas.drawLine(gridRect.left, yPix,
            gridRect.right, yPix, marker.getLinePaint()
        );
        float xPix = marker.getTextPosition().getPixelValue(
            gridRect.width());
        xPix += gridRect.left;
        drawMarkerText(canvas, marker.getText(), marker, xPix, yPix);

代码示例来源:origin: halfhp/androidplot

@Test
public void removeMarker_withYMarker_removesExpectedYMarkerOnly() {
  YValueMarker YMarker1 = new YValueMarker(1, "Y1");
  YValueMarker YMarker2 = new YValueMarker(2, "Y2");
  YValueMarker YMarker3 = new YValueMarker(2, "Y2");
  YValueMarker YMarker4 = new YValueMarker(2, "Y2");
  YValueMarker YMarker5 = new YValueMarker(2, "Y2");
  plot.addMarker(YMarker1);
  plot.addMarker(YMarker2);
  plot.addMarker(YMarker3);
  plot.addMarker(YMarker4);
  plot.addMarker(YMarker5);
  assertEquals(5, plot.getYValueMarkers().size());
  assertEquals(YMarker3, plot.removeMarker(YMarker3));
  assertEquals(4, plot.getYValueMarkers().size());
}

代码示例来源:origin: halfhp/androidplot

@Test
public void drawMarkers_drawsLineForEachMarker() {
  xyPlot.addMarker(new XValueMarker(1, "x"));
  xyPlot.addMarker(new YValueMarker(-1, "y"));
  graphWidget.drawMarkers(canvas);
  // TODO: verifications
  verify(canvas, times(2))
      .drawLine(anyFloat(), anyFloat(), anyFloat(), anyFloat(), any(Paint.class));
}

代码示例来源:origin: halfhp/androidplot

plot.addMarker(xMarker5);
YValueMarker YMarker1 = new YValueMarker(1, "Y1");
YValueMarker YMarker2 = new YValueMarker(2, "Y2");
YValueMarker YMarker3 = new YValueMarker(2, "Y2");
YValueMarker YMarker4 = new YValueMarker(2, "Y2");
YValueMarker YMarker5 = new YValueMarker(2, "Y2");

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com