mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
changes made to api for the newyorkmag globe project and while working on illustrator stuff
This commit is contained in:
+21
-12
@@ -108,9 +108,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
/** tint that was last set (read-only) */
|
||||
public int tintColor;
|
||||
|
||||
boolean tintAlpha;
|
||||
float tintR, tintG, tintB, tintA;
|
||||
int tintRi, tintGi, tintBi, tintAi;
|
||||
protected boolean tintAlpha;
|
||||
protected float tintR, tintG, tintB, tintA;
|
||||
protected int tintRi, tintGi, tintBi, tintAi;
|
||||
|
||||
// ........................................................
|
||||
|
||||
@@ -120,9 +120,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
/** fill that was last set (read-only) */
|
||||
public int fillColor;
|
||||
|
||||
boolean fillAlpha;
|
||||
float fillR, fillG, fillB, fillA;
|
||||
int fillRi, fillGi, fillBi, fillAi;
|
||||
protected boolean fillAlpha;
|
||||
protected float fillR, fillG, fillB, fillA;
|
||||
protected int fillRi, fillGi, fillBi, fillAi;
|
||||
|
||||
// ........................................................
|
||||
|
||||
@@ -132,9 +132,9 @@ public class PGraphics extends PImage implements PConstants {
|
||||
/** stroke that was last set (read-only) */
|
||||
public int strokeColor;
|
||||
|
||||
boolean strokeAlpha;
|
||||
float strokeR, strokeG, strokeB, strokeA;
|
||||
int strokeRi, strokeGi, strokeBi, strokeAi;
|
||||
protected boolean strokeAlpha;
|
||||
protected float strokeR, strokeG, strokeB, strokeA;
|
||||
protected int strokeRi, strokeGi, strokeBi, strokeAi;
|
||||
|
||||
// ........................................................
|
||||
|
||||
@@ -174,8 +174,12 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* Model transformation of the form m[row][column],
|
||||
* which is a "column vector" (as opposed to "row vector") matrix.
|
||||
*/
|
||||
public float m00, m01, m02;
|
||||
public float m10, m11, m12;
|
||||
//public float m00, m01, m02;
|
||||
//public float m10, m11, m12;
|
||||
public float m00, m01, m02, m03;
|
||||
public float m10, m11, m12, m13;
|
||||
public float m20, m21, m22, m23;
|
||||
public float m30, m31, m32, m33;
|
||||
|
||||
//public int angleMode;
|
||||
|
||||
@@ -1786,7 +1790,12 @@ public class PGraphics extends PImage implements PConstants {
|
||||
if (which != null) {
|
||||
textFont = which;
|
||||
textFontNative = which.font;
|
||||
textFontNativeMetrics = null;
|
||||
//textFontNativeMetrics = null;
|
||||
// changed for rev 0104 for textMode(SHAPE) in opengl
|
||||
if (textFontNative != null) {
|
||||
textFontNativeMetrics =
|
||||
Toolkit.getDefaultToolkit().getFontMetrics(textFontNative);
|
||||
}
|
||||
textSize(which.size);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -2770,6 +2770,31 @@ public class PGraphics3 extends PGraphics {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the modelview into m00, m01, et al so that it can be used.
|
||||
*/
|
||||
public void loadMatrix() {
|
||||
m00 = modelview.m00;
|
||||
m01 = modelview.m01;
|
||||
m02 = modelview.m02;
|
||||
m03 = modelview.m03;
|
||||
|
||||
m10 = modelview.m10;
|
||||
m11 = modelview.m11;
|
||||
m12 = modelview.m12;
|
||||
m13 = modelview.m13;
|
||||
|
||||
m20 = modelview.m20;
|
||||
m21 = modelview.m21;
|
||||
m22 = modelview.m22;
|
||||
m23 = modelview.m23;
|
||||
|
||||
m30 = modelview.m30;
|
||||
m31 = modelview.m31;
|
||||
m32 = modelview.m32;
|
||||
m33 = modelview.m33;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print the current model (or "transformation") matrix.
|
||||
|
||||
@@ -6,6 +6,9 @@ X if it doesn't display to the screen, needs to never show a window
|
||||
X basically if the main gfx context isn't viewable, close the window
|
||||
X since it may have already been opened at 100x100
|
||||
X avoid opening it in the first place?
|
||||
X added toolkit getFontMetrics() for shape mode fonts to be able to change size
|
||||
|
||||
_ registerSize() in arcball is causing trouble
|
||||
|
||||
_ loadImage(url) broken on windows
|
||||
_ http://dev.processing.org/bugs/show_bug.cgi?id=279
|
||||
|
||||
Reference in New Issue
Block a user