Java Code Examples for processing.core.PGraphics#noSmooth()
The following examples show how to use
processing.core.PGraphics#noSmooth() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PG.java From haxademic with MIT License | 6 votes |
public static PGraphics newDataPG(int w, int h) { // PGraphics newPG = P.p.createGraphics(w, h, PRenderers.P3D); // PGraphics newPG = P.p.createGraphics(w, h, P.P32); PGraphics newPG = PGraphics32.createGraphics(P.p, w, h); newPG.noSmooth(); ((PGraphicsOpenGL)newPG).textureSampling(2); newPG.beginDraw(); // newPG.hint(P.DISABLE_TEXTURE_MIPMAPS); newPG.hint(PConstants.DISABLE_DEPTH_SORT); newPG.hint(PConstants.DISABLE_DEPTH_TEST); newPG.hint(PConstants.DISABLE_DEPTH_MASK); newPG.background(0, 0); newPG.noStroke(); newPG.endDraw(); // moved these calls into this block for a full test of options // OpenGLUtil.setTextureQualityLow(newPG); // necessary for proper texel lookup in GLSL! // OpenGLUtil.optimize2D(newPG); return newPG; }
Example 2
Source File: Utility.java From Project-16x16 with GNU General Public License v3.0 | 5 votes |
public static PImage resizeImage(PImage img, float scl) { PGraphics pg = applet.createGraphics((int) (img.width * scl), (int) (img.height * scl)); pg.noSmooth(); pg.beginDraw(); pg.clear(); pg.scale(scl, scl); pg.image(img, 0, 0); pg.endDraw(); return pg; }
Example 3
Source File: PG.java From haxademic with MIT License | 5 votes |
public static PGraphics newPG32(int w, int h, boolean smooth, boolean hasAlpha) { PGraphics newPG = PGraphics32.createGraphics(P.p, w, h); if(smooth == false) newPG.noSmooth(); if(hasAlpha == true) { newPG.beginDraw(); newPG.background(0, 0); newPG.noStroke(); newPG.endDraw(); } PG.setTextureRepeat(newPG, true); return newPG; }