Package ar.glyphsets.implicitgeometry

Examples of ar.glyphsets.implicitgeometry.Indexed


      shaper = new Indexed.ToRect(size, size, false, xfield, yfield);
      valuer = new Indexed.ToValue<Object,V>(vfield);
    }
   
    public Glyph<Rectangle2D, V> value(GenericRecord r) {
      Indexed from =new GlyphsetTools.IndexedRecord(r);
      return new SimpleGlyph<Rectangle2D, V>(shaper.shape(from), valuer.value(from));
    }
View Full Code Here


   * @return The acc passed in, with new entries in the form (key, val, idx)
   */
  public static Collection<Indexed> broadcast(Object key, Iterable<?> values, Collection<Indexed> acc) {
    int i=0;
    for (Object val: values) {
      Indexed item = new Indexed.ArrayWrapper(new Object[]{key, val, i});
      acc.add(item);
      i++;
    }
    return acc;
  }
View Full Code Here

      catch (IOException e) {throw new RuntimeException(String.format("Error reading around character %d of %s.", charsRead, source.getName()), e);}
      if (next == null) {return;}
     
      try {
        for (String s: next) {charsRead += s.length();} //TODO: Probably not the fastest way to do this...
        Indexed base = conv.applyTo(new Indexed.ListWrapper(next));
        cached = new SimpleGlyph<>(shaper.shape(base), valuer.value(base));
      } catch (Exception e) {throw new RuntimeException(String.format("Error constructing glyph around character %d of %s", charsRead, source.getName()), e);}
    }
View Full Code Here

TOP

Related Classes of ar.glyphsets.implicitgeometry.Indexed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.