I was trying to render a simple text into an embedded processing application. I use the following code:
public void setup(){
size(this.getWidth(), this.getHeight(), P2D);
textFont(loadFont("Verdana-12.vlw"));
}
public void draw(){
background(255, 255, 255);
smooth();
fill(0,0,0);
text("I like reading Monteiro Lobato.", 100,100);
}
It works, but the text is rendered awfully. I looks like the text was blured and the first line of characters bitmap was cropped. I spent many hours reading the forum, trying different codes, comparing the processing IDE and mine. I was going to give it away, when I decided to be more drastic: I changed the rendering engine, that is, I changed
size(this.getWidth(), this.getHeight(), P2D);
to
size(this.getWidth(), this.getHeight(), JAVA2D);
All text became beautiful and marvelous! My post is that I can't understand why? Why?! Shouldn't be the processing rendering better qualified to be used than the Java2D?
I am trying to insert an processing view inside an eclipse EditorPart. Does anyone have ever tried to do that?
I have added the "core.jar" to the Reference Libraries, and created a class ProcessingViewer extends PApplet, that implements the Toroid example. At my EditorPart class, inside the createPartControl I did the following:
ProcessingViewer pap = new ProcessingViewer();
I googled "Eclipse RCP" + "processing" but I couldn't find any tip of how to add an processing view to the RCP's EditorPart. It seems to me that there are 2 main problems:
1) I should add "pap" to its parent
2) I should call something like pap.main(....), but it doesn't seems to be appropriate in this case