Examples of Surface


Examples of com.google.appengine.demos.sticky.client.model.Surface

    return clients;
  }

  private static Surface toClientSurface(Store.Surface surface) {
    final List<String> names = surface.getAuthorNames();
    return new Surface(KeyFactory.keyToString(surface.getKey()), surface
        .getTitle(), names.toArray(new String[names.size()]), surface
        .getNotes().size(), surface.getLastUpdatedAt());
  }
View Full Code Here

Examples of com.google.appengine.demos.sticky.client.model.Surface

    }
  }

  private Surface getSurface(Store.Api api, Key key) {
    // Attempt to load from cache.
    final Surface fromCache = cache.getSurface(key);
    if (fromCache != null) {
      return fromCache;
    }

    // Cache lookup failed, query the data store.
View Full Code Here

Examples of com.google.appengine.demos.sticky.client.model.Surface

    add(controller.getButton());

    editController = new EditController(model, images, "header-author-edit");

    final Surface surface = model.getSelectedSurface();
    surface.addObserver(this);
    attachTitleView(images, surface);

    add(new LoginInfoView(model.getCurrentAuthor(), model.getLogoutUrl()));
    model.addDataObserver(this);
  }
View Full Code Here

Examples of com.jme3.scene.shape.Surface

                Geometry nurbGeometry = new Geometry("", nurbCurve);
                result.add(nurbGeometry);
            }
        } else {// creating the nurb surface
            int resolv = ((Number) nurb.getFieldValue("resolv")).intValue() + 1;
            Surface nurbSurface = Surface.createNurbsSurface(controlPoints, knots, resolu, resolv, orderU, orderV);
            Geometry nurbGeometry = new Geometry("", nurbSurface);
            result = new ArrayList<Geometry>(1);
            result.add(nurbGeometry);
        }
        return result;
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

  public AbstractApp(Surface surface) {
    primarySurface = surface;
  }
 
  public AbstractApp(int width, int height) {
    this(new Surface(width, height));
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

  public AbstractApp(int width, int height) {
    this(new Surface(width, height));
  }
 
  public AbstractApp(Vector2 size) {
    this(new Surface(size));
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

 
  /**
   * Creates a new surface for testing.
   */
  private static Surface createSurface() {
    return new Surface(1, 1);
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

    testShadowBlur();
    testSaveRestore();   
  }
 
  private void testSaveRestore() {
    Surface surface = createSurface();
    surface.setGlobalAlpha(.5)
        .setGlobalCompositeOperation(Composition.SOURCE_OVER)
        .setLineCap(LineCap.BUTT)
        .setLineJoin(LineJoin.ROUND)
        .setLineWidth(5.0)
        .setMiterLimit(5.0)
        .setFont("20px sans-serif")
        .setTextAlign(TextAlign.CENTER)
        .setTextBaseline(TextBaseline.TOP)
        .setShadowOffsetX(1.0)
        .setShadowOffsetY(1.0)
        .setShadowBlur(1.0);   
    surface.save();
    surface.setGlobalAlpha(1.0)
        .setGlobalCompositeOperation(Composition.SOURCE_IN)
        .setLineCap(LineCap.ROUND)
        .setLineJoin(LineJoin.MITER)
        .setLineWidth(1.0)
        .setMiterLimit(1.0)
        .setFont("10px sans-serif")
        .setTextAlign(TextAlign.END)
        .setTextBaseline(TextBaseline.BOTTOM)
        .setShadowOffsetX(5.0)
        .setShadowOffsetY(5.0)
        .setShadowBlur(5.0);
   
    surface.restore();
    testResult("Restore Global Alpha", .5, surface.getGlobalAlpha());
    testResult("Restore Global Composition", Composition.SOURCE_OVER,
        surface.getGlobalCompositeOperation());
    testResult("Restore Line Cap", LineCap.BUTT, surface.getLineCap());
    testResult("Restore Line Join", LineJoin.ROUND, surface.getLineJoin());
    testResult("Restore Line Width", 5.0, surface.getLineWidth());
    testResult("Restore Miter Limit", 5.0, surface.getMiterLimit());
    testResult("Restore Font", "20px sans-serif", surface.getFont());
    testResult("Restore Text Align", TextAlign.CENTER, surface.getTextAlign());
    testResult("Restore Text Baseline", TextBaseline.TOP, surface.getTextBaseline());
    testResult("Restore Shadow Offset X", 1.0, surface.getShadowOffsetX());
    testResult("Restore Shadow Offset Y", 1.0, surface.getShadowOffsetY());
    testResult("Restore Shadow Blur", 1.0, surface.getShadowBlur());   
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

    testResult("Restore Shadow Offset Y", 1.0, surface.getShadowOffsetY());
    testResult("Restore Shadow Blur", 1.0, surface.getShadowBlur());   
  }

  private void testFont() {
    Surface surface = createSurface();
    testResult("Font", "10px sans-serif", surface.getFont());
    testResult("Font", "20pt Arial",
        surface.setFont("20pt Arial").getFont());
    testResult("Font", "italic 400 12px/2 Unknown Font, sans-serif",
        surface.setFont("italic 400 12px/2 Unknown Font, sans-serif").getFont());
  }
View Full Code Here

Examples of gwt.g2d.client.graphics.Surface

    testResult("Font", "italic 400 12px/2 Unknown Font, sans-serif",
        surface.setFont("italic 400 12px/2 Unknown Font, sans-serif").getFont());
  }

  private void testGlobalAlpha() {
    Surface surface = createSurface();
    testResult("Global Alpha", 1.0, surface.getGlobalAlpha());
    for (int i = 0; i < NUM_RANDOM_TESTS; i++) {
      double randNumber = Random.nextDouble();
      testResult("Global Alpha", randNumber,
          surface.setGlobalAlpha(randNumber).getGlobalAlpha());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.