org.eclipse.swt.graphics.Transform.setElements()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(122)

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

Transform.setElements介绍

[英]Modifies the receiver to represent a new transformation given all of the elements that represent the matrix that describes that transformation.
[中]修改接收器以表示一个新的变换,给定表示描述该变换的矩阵的所有元素。

代码示例

代码示例来源:origin: org.piccolo2d/piccolo2d-swt

/**
 * Updates the SWT transform instance such that it matches AWTs counterpart.
 */
private void updateSWTTransform() {
  final double[] m = new double[6];
  transform.getMatrix(m);
  swtTransform.setElements((float) m[0], (float) m[1], (float) m[2], (float) m[3], (float) m[4], (float) m[5]);
}

代码示例来源:origin: org.jfree/swtgraphics2d

/**
 * Internal method to convert a AWT transform object into
 * a SWT transform resource. If a corresponding SWT transform
 * instance is already in the pool, it will be used
 * instead of creating a new one. This is used in
 * {@link #setTransform()} for instance.
 *
 * @param awtTransform The AWT transform to convert.
 * @return A SWT transform instance.
 */
private Transform getSwtTransformFromPool(AffineTransform awtTransform) {
  Transform t = (Transform) this.transformsPool.get(awtTransform);
  if (t == null) {
    t = new Transform(this.gc.getDevice());
    double[] matrix = new double[6];
    awtTransform.getMatrix(matrix);
    t.setElements((float) matrix[0], (float) matrix[1],
        (float) matrix[2], (float) matrix[3],
        (float) matrix[4], (float) matrix[5]);
    addToResourcePool(t);
    this.transformsPool.put(awtTransform, t);
  }
  return t;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

transform.setElements( elements[ 0 ],
            elements[ 1 ],
            elements[ 2 ],

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

transform.handle.setTransformStruct(struct);
} else {
  transform.setElements(1, 0, 0, 1, 0, 0);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

Cairo.cairo_matrix_multiply(transform.handle, transform.handle, identity);
} else {
  transform.setElements(1, 0, 0, 1, 0, 0);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

Cairo.cairo_matrix_multiply(transform.handle, transform.handle, identity);
} else {
  transform.setElements(1, 0, 0, 1, 0, 0);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

Cairo.cairo_matrix_multiply(transform.handle, transform.handle, identity);
} else {
  transform.setElements(1, 0, 0, 1, 0, 0);

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

if (handle == null) SWT.error(SWT.ERROR_NO_HANDLES);
  handle.retain();
  setElements(m11, m12, m21, m22, dx, dy);
  init();
} finally {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

Gdip.Matrix_delete(identity);
} else {
  transform.setElements(1, 0, 0, 1, 0, 0);

相关文章