<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with nosmooth() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=nosmooth%28%29</link>
      <pubDate>Sun, 08 Aug 2021 19:05:36 +0000</pubDate>
         <description>Tagged with nosmooth() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggednosmooth%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>noSmooth() doesn't works with P2D...</title>
      <link>https://forum.processing.org/two/discussion/28102/nosmooth-doesn-t-works-with-p2d</link>
      <pubDate>Thu, 23 Aug 2018 19:53:52 +0000</pubDate>
      <dc:creator>aquen24</dc:creator>
      <guid isPermaLink="false">28102@/two/discussions</guid>
      <description><![CDATA[<p>I'm doing a little game and I'm using pixel art images so I need to use noSmooth() which doesn't works in P2D...
I would like to know if there is another way to use pixel art in P2D.</p>

<p>Sorry about mistakes, I'm french. :D</p>

<p>With P2D
<img src="https://forum.processing.org/two/uploads/imageupload/633/LBP26M4O5IQ7.PNG" alt="Capture" title="Capture" /></p>

<p>Without P2D
<img src="https://forum.processing.org/two/uploads/imageupload/651/8IKGHV6I0YCQ.PNG" alt="Capture" title="Capture" /></p>
]]></description>
   </item>
   <item>
      <title>PGraphics.image() not displayed with noSmooth() and P2D?</title>
      <link>https://forum.processing.org/two/discussion/25676/pgraphics-image-not-displayed-with-nosmooth-and-p2d</link>
      <pubDate>Fri, 22 Dec 2017 05:10:48 +0000</pubDate>
      <dc:creator>brontosplachna</dc:creator>
      <guid isPermaLink="false">25676@/two/discussions</guid>
      <description><![CDATA[<p>When running this sketch, press any key to cause the PGraphics to be displayed.  When P2D and noSmooth() are used, the PGraphics is displayed only momentarily.  Is there a logical reason for this?</p>

<pre><code>PGraphics pg1;

void setup() {
  size(640, 480, P2D); // remove P2D's to allow pg1 to be displayed
  noSmooth(); // or remove this to allow pg1 to be displayed
  background(0);
  fill(0, 255, 0);
  rect(0, 0, 100, 200);

  pg1 = createGraphics(width, height, P2D);
  pg1.noSmooth();
  pg1.beginDraw();
  pg1.background(255);
  pg1.fill(0);
  pg1.rect(100, 100, 100, 50);
  pg1.endDraw();
}

void draw() {
}

void keyPressed() { 
  background(0);
  image(pg1, 0, 0, width, height);
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>100% CPU utilisation when playing multiple videos using the video library</title>
      <link>https://forum.processing.org/two/discussion/14329/100-cpu-utilisation-when-playing-multiple-videos-using-the-video-library</link>
      <pubDate>Fri, 08 Jan 2016 01:14:24 +0000</pubDate>
      <dc:creator>alzxul</dc:creator>
      <guid isPermaLink="false">14329@/two/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I'm trying to play some movies and sound in a processing sketch; there are 10 movies and 1 sound file - all the movies are fairly small [&lt;=5MB]; I create them in setup and call .play() on them, and then in draw() I use image() on them, and I also use movieEvent() function to call .read() on them; whenever I run this the videos lag and my CPU spikes to 100%</p>

<p>Surely playing 10 concurrent movies isn't that onerous?</p>

<p>Does anyone have any ideas for how to improve the performance or can tell me if I'm doing something wrong or missing something?</p>

<p>Any help would be much appreciated, thanks</p>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>Image quality (pixel image is blurry)</title>
      <link>https://forum.processing.org/two/discussion/21593/image-quality-pixel-image-is-blurry</link>
      <pubDate>Fri, 24 Mar 2017 20:10:47 +0000</pubDate>
      <dc:creator>OrOrg</dc:creator>
      <guid isPermaLink="false">21593@/two/discussions</guid>
      <description><![CDATA[<p>Hi, I'm back with another question:</p>

<p>Is there a way to have an image be drawn without it becoming blurry?
I am just drawing an 8x8 png image, and since the game i'm making is completely adapting the interface with the screen size, I have to make the image bigger. I could just resize the image to, like, 128x128, but I since I think displaying an 8x8 image is easier, I'd rather like to use that.</p>

<p>I am now using</p>

<p><code>image(ImgPowerupPoint, height/2, height/2, height/2, height/2)</code></p>

<p>for an 8x8 image, and it becomes pretty blurry (it is a red 8x8 sphere, as far as that can still be called a sphere):
<img src="https://forum.processing.org/two/uploads/imageupload/163/J7CTRXRMGBE5.png" alt="IMG_24032017_203337_0" title="IMG_24032017_203337_0" /></p>

<p>I am also having problems with looping a certain sound, but that is not relevant in this topic and I don't think people would be eager to try to help since my code is already 636 lines long...</p>

<p>Kind regards,
OrOrg</p>
]]></description>
   </item>
   <item>
      <title>The fastest way to delete previous text</title>
      <link>https://forum.processing.org/two/discussion/24573/the-fastest-way-to-delete-previous-text</link>
      <pubDate>Mon, 16 Oct 2017 08:35:04 +0000</pubDate>
      <dc:creator>ddaann88</dc:creator>
      <guid isPermaLink="false">24573@/two/discussions</guid>
      <description><![CDATA[<p>Hello. I tried to rewrite text with the backgroud color, but the edge (outline) of the old text remains on the screen. I have no idea why. Can you please help me?</p>

<pre><code>background(-1);
noLoop();
fill(#500F0F);
text("99", 300, 200);
fill(-1);
text("99",300, 200);
</code></pre>
]]></description>
   </item>
   <item>
      <title>noSmooth() isnt working in P3D :(</title>
      <link>https://forum.processing.org/two/discussion/24084/nosmooth-isnt-working-in-p3d</link>
      <pubDate>Sun, 10 Sep 2017 12:03:49 +0000</pubDate>
      <dc:creator>GeorgeJava</dc:creator>
      <guid isPermaLink="false">24084@/two/discussions</guid>
      <description><![CDATA[<p>Why is in P3D &gt; size(w,h,P3D) &lt; doesnt working noSmooth ? :/ i have pixel art and i resize image 2x. and i have noSmooth(). because isnt working... pls help, thx..</p>
]]></description>
   </item>
   <item>
      <title>How can I achieve noSmooth() with the P3D renderer ?</title>
      <link>https://forum.processing.org/two/discussion/21564/how-can-i-achieve-nosmooth-with-the-p3d-renderer</link>
      <pubDate>Thu, 23 Mar 2017 20:22:08 +0000</pubDate>
      <dc:creator>orgicus</dc:creator>
      <guid isPermaLink="false">21564@/two/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I'd like to render basic 3D shapes without any aliasing/smoothing with a PGraphics instance using the P3D renderer, but noSmooth() doesn't seem to work.</p>

<p>In OF I remember calling <code>setTextureMinMagFilter(GL_NEAREST,GL_NEAREST);</code> on a texture.</p>

<p>What would be the equivalent in Processing ?</p>

<p>Thank you,
George</p>
]]></description>
   </item>
   <item>
      <title>Resize image without any smoothing</title>
      <link>https://forum.processing.org/two/discussion/21391/resize-image-without-any-smoothing</link>
      <pubDate>Tue, 14 Mar 2017 13:39:33 +0000</pubDate>
      <dc:creator>Kaggen</dc:creator>
      <guid isPermaLink="false">21391@/two/discussions</guid>
      <description><![CDATA[<p>Hi!</p>

<p>I'm trying to resize an image and display it without any smoothing (mipmap, bicubic, linear or other).</p>

<p>The point is i want it to stay "pixelated" (sharp pixels). See picture below...</p>

<p>I'm using P2D.</p>

<p>Any ideas?</p>

<p><img src="https://forum.processing.org/two/uploads/imageupload/754/MSI82ZARDJ4S.PNG" alt="resize" title="resize" /></p>
]]></description>
   </item>
   <item>
      <title>How to remove odd white lines/glare</title>
      <link>https://forum.processing.org/two/discussion/20365/how-to-remove-odd-white-lines-glare</link>
      <pubDate>Thu, 19 Jan 2017 21:55:58 +0000</pubDate>
      <dc:creator>Graywolf</dc:creator>
      <guid isPermaLink="false">20365@/two/discussions</guid>
      <description><![CDATA[<p>I just started working with Processing, and my program is working like I want to, except that there are odd white, curved lines that look almost like a glare that shouldn't be there on it. They appear on the corners and the edges, as shown here:</p>

<p><img src="https://forum.processing.org/two/uploads/imageupload/335/J404MQEC4TSL.png" alt="Screenshot 2017-01-19 13.40.06" title="Screenshot 2017-01-19 13.40.06" /></p>

<p>(sorry this one isn't as pretty as it could be, gotta make it less random, also it's most easily seen on the right edge)</p>

<p>And here's the code (Java):</p>

<pre><code>float lerpFrequency;
float darkestStart;
float lightestStart;
float spacing;
int x;
int y;
int eighth;
float rR;
float rG;
float rB;

void setup() {
    size (1024, 1024);
    background (255, 255, 255);
    stroke(0);
    lerpFrequency = 7;
    darkestStart = 0;
    lightestStart = 255;
    spacing = 1;
    x = width;
    y = width/2;
    eighth = 1;
    rR = int(random(darkestStart,lightestStart));
    rG = int(random(darkestStart,lightestStart));
    rB = int(random(darkestStart,lightestStart));
}

void draw() {
    rR = random(rR - lerpFrequency, rR + lerpFrequency);
    rG = random(rG - lerpFrequency, rG + lerpFrequency);
    rB = random(rB - lerpFrequency, rB + lerpFrequency);
    stroke (rR, rG, rB);
    //fill(rB,rG,rR); EPILEPSY WARNING

    if (eighth == 1 || eighth == 8) {
        y-=spacing;

        if (eighth == 1 &amp;&amp; y &lt;= 0) {
            eighth++;
        } else if (eighth == 8 &amp;&amp; y &lt;= width/2) {
            eighth = 1;
        }
    } else if (eighth == 2 || eighth == 3) {
        x-=spacing;

        if (eighth == 2 &amp;&amp; x &lt;= width/2 || eighth == 3 &amp;&amp; x &lt;= 0) {
            eighth++;
        }
    } else if (eighth == 4 || eighth == 5) {
        y+=spacing;

        if (eighth == 4 &amp;&amp; y &gt;= width/2 || eighth == 5 &amp;&amp; y &gt;= width) {
            eighth++;
        }
    } else if (eighth == 6 || eighth == 7) {
        x+=spacing;

        if (eighth == 6 &amp;&amp; x &gt;= width/2 || eighth == 7 &amp;&amp; x &gt;= width) {
            eighth++;
        }
    }
    //background(255);
    ellipse(width/2, width/2, x, y);
}

void mouseClicked() {
    setup();
}
</code></pre>

<p>Anyway I am clueless as to why it would create these white lines, since I would assume that any overlapping pixels would just replace each other instead of leaving some white artifacts or just a rendering error from my computer, I don't know.</p>

<p>Thanks for any help you can give to me!</p>
]]></description>
   </item>
   <item>
      <title>Redraw Line Bug?</title>
      <link>https://forum.processing.org/two/discussion/20001/redraw-line-bug</link>
      <pubDate>Fri, 30 Dec 2016 20:14:32 +0000</pubDate>
      <dc:creator>batman42ca</dc:creator>
      <guid isPermaLink="false">20001@/two/discussions</guid>
      <description><![CDATA[<p>I'm trying to draw a line, then redraw that same line using the background colour (I don't want to redraw the background) but something is being left behind.</p>

<p>I modified one of the examples on this page to test it:</p>

<p><a href="https://p5js.org/reference/#/p5/blendMode" target="_blank" rel="nofollow">https://p5js.org/reference/#/p5/blendMode</a></p>

<p>Here's my code. Am I doing something wrong or did I discover a bug?</p>

<pre><code>background(0);
blendMode(REPLACE);
strokeWeight(30); // will work with a stroke weight of 1 as well - 30 is easier to see.
stroke(255);
line(25, 25, 75, 75);
stroke(0);
line(25, 25, 75, 75);
</code></pre>
]]></description>
   </item>
   <item>
      <title>What are point() and line() doing on the pixel level?</title>
      <link>https://forum.processing.org/two/discussion/17797/what-are-point-and-line-doing-on-the-pixel-level</link>
      <pubDate>Tue, 09 Aug 2016 05:54:49 +0000</pubDate>
      <dc:creator>mscottveach</dc:creator>
      <guid isPermaLink="false">17797@/two/discussions</guid>
      <description><![CDATA[<p>Looking at the result of point and line under a magnifying glass, I realized that my assumption that there
was a 1 to 1 correspondence between processing pixels and my monitor's pixels was naive.</p>

<p>I was surprised by a few things:</p>

<p>When I try to draw a line using a series of point calls, it looks very different than when I use line and neither
one always does what I expected. (For example, drawing a simple line segment will look one way in isolation
and then the entire line will look different if its drawn so that one of it's ends is adjacent to a different line.)</p>

<p>Can anyone point me to a source where I can learn what's happening on the pixel level with these functions.</p>
]]></description>
   </item>
   <item>
      <title>pixelDensity below 1.0</title>
      <link>https://forum.processing.org/two/discussion/16482/pixeldensity-below-1-0</link>
      <pubDate>Sat, 07 May 2016 22:48:20 +0000</pubDate>
      <dc:creator>whoisbma</dc:creator>
      <guid isPermaLink="false">16482@/two/discussions</guid>
      <description><![CDATA[<p>Hi, I'm experimenting with pixelDensity values below 1 in order to get a lower resolution render context that is still scaled to an arbitrary canvas size. It results in blended pixel values regardless of noSmooth() being set. Any idea how to get my clean "pixels" with a pixelDensity value below 1? (or a better way to solve this altogether?)</p>
]]></description>
   </item>
   <item>
      <title>P2D-Mode: double Pixels</title>
      <link>https://forum.processing.org/two/discussion/15726/p2d-mode-double-pixels</link>
      <pubDate>Mon, 28 Mar 2016 12:27:37 +0000</pubDate>
      <dc:creator>carlosparadiso</dc:creator>
      <guid isPermaLink="false">15726@/two/discussions</guid>
      <description><![CDATA[<p>in following code</p>

<pre><code>void setup() {
  size(200, 200, P2D);
  background(255);
}

void draw() {
  point(mouseX, mouseY);  
}
</code></pre>

<p>processing draws to points, one at mouseX,mouseY another one at mouseX+1, mouseY-1. Is this a bug in processing or an openGL-bug? Has anyone the same problem? (MacBook Pro, NVIDIA GeForce GT 750M 2048 MB, OS X 10.10.5, Processing 3.0.2)</p>
]]></description>
   </item>
   <item>
      <title>P3D blur objects</title>
      <link>https://forum.processing.org/two/discussion/15547/p3d-blur-objects</link>
      <pubDate>Thu, 17 Mar 2016 17:21:11 +0000</pubDate>
      <dc:creator>cameyo</dc:creator>
      <guid isPermaLink="false">15547@/two/discussions</guid>
      <description><![CDATA[<pre><code>void setup()
{
 //size(200, 200, P2D);
  size(200, 200, P3D);
  background(0);
}
void draw()
{
  background(0);
  stroke(240,20,20);
  fill(240);
  rect(50,50,100,100);
}
</code></pre>

<p><img src="https://forum.processing.org/two/uploads/imageupload/752/B3MW4DDPL04T.png" alt="p3d_forum" title="p3d_forum" /></p>

<p>Why in P3D mode the rect is blurred?<br />
What i'm missing ?   :-?</p>
]]></description>
   </item>
   <item>
      <title>How to draw a complete color wheel?</title>
      <link>https://forum.processing.org/two/discussion/14032/how-to-draw-a-complete-color-wheel</link>
      <pubDate>Wed, 16 Dec 2015 22:27:03 +0000</pubDate>
      <dc:creator>Gears</dc:creator>
      <guid isPermaLink="false">14032@/two/discussions</guid>
      <description><![CDATA[<p>Hello people,</p>

<p>I'm trying to create a program that I can use to control the LED strips inside my PC using Arduino. I currently have communication and a lot of other parts working already, but I am stuck on a small problem.</p>

<p>I am able to draw a color wheel or rectangle in this case that <strong>should</strong> represent all colors available. The program looks at the value under the mouse while it is pressed, and sends this to the Arduino. The problem I am having is that the colors nearest to the edge are not picked up as pure red (255,0,0), green or blue. The closest value I can get is: (255,32,32).</p>

<p>What I have tried so far is changing the size of the rectangle to exclude the missing colors being rendered off-screen. I have found that the code reading the color value under the cursor is correct - I did this by drawing a plain pure red rectangle in the corner, which returned the correct value (255,0,0). I also found that simply subtracting 32 from the values is incorrect, as on pure white you will find the value to be (223,223,223).</p>

<p>This causes significant problems with my LEDs, as a value of 32 on the PWM pin will light the corresponding color up by quite a bit because of the non-linear relationship between LED volt and brightness.</p>

<p>So to reiterate my question: how do I draw a color circle or rectangle from which I can get 100% red, blue and green as well?</p>

<p>Here is my code:</p>

<pre><code>import processing.serial.*; 

Serial myPort;    // The serial port
String inString;  // Input string from serial port
int lf = 10;      // ASCII linefeed 
int[] rgb = new int[3];
PImage m;

void setup(){
  size(400,400);
  frameRate(120);
  smooth(4);
  ellipseMode(CENTER);
  background(255);

  colorMode(HSB, 400);
  for (int i = 0; i &lt; 400; i++) {
    for (int j = 0; j &lt; 400; j++) {
      stroke(i, j, 400);
      point(i, j);
    }
  }
  m=get();

  myPort = new Serial(this, Serial.list()[1], 9600); 
  myPort.bufferUntil(lf);
}

void draw(){
  image(m,0,0);
  if(mousePressed){
    color c = get(mouseX,mouseY);
    fill(c);
    stroke(0);
    ellipse(mouseX,mouseY,30,30);
    rgb[0] = c &gt;&gt; 16 &amp; 0xFF;
    rgb[1] = c &gt;&gt; 8 &amp; 0xFF;
    rgb[2] = c &amp; 0xFF;

    fill(0);
    text(rgb[0], 10,70);
    text(rgb[1], 10,90);
    text(rgb[2], 10,110);

    String test = ",";
    test += str(rgb[0]);
    test += "+";
    test += str(rgb[1]);
    test += "+";
    test += str(rgb[2]);
    test += "\n";

    myPort.write(test);
  }
  fill(0);
  text("Received: " + inString, 10,50);
}

void serialEvent(Serial p) { 
  inString = p.readString(); 
} 
</code></pre>
]]></description>
   </item>
   <item>
      <title>Filtering on image resize</title>
      <link>https://forum.processing.org/two/discussion/12902/filtering-on-image-resize</link>
      <pubDate>Fri, 09 Oct 2015 02:34:48 +0000</pubDate>
      <dc:creator>ch3</dc:creator>
      <guid isPermaLink="false">12902@/two/discussions</guid>
      <description><![CDATA[<p>I want to scale up a PImage or a PGraphics ten times or more, but rather than a smooth interpolation, I want none so the pixels appear likes big blocks.
I tried to run the noSmooth() function before the image() or scale()/.resize(), but I didn't see any difference in the result.</p>

<p>Any ideas?</p>
]]></description>
   </item>
   <item>
      <title>Where is this border coming from?</title>
      <link>https://forum.processing.org/two/discussion/12499/where-is-this-border-coming-from</link>
      <pubDate>Mon, 14 Sep 2015 00:22:56 +0000</pubDate>
      <dc:creator>shawnlau</dc:creator>
      <guid isPermaLink="false">12499@/two/discussions</guid>
      <description><![CDATA[<p>After looking at the type of paint stroke that is made with simply using line ( pmouseX, pmouseY, mouseX,mouseY) when the mouse is dragged, the problem seems to be the spacing. Its erratic and ugly. I found this code on how to blit a brush tip with even spacing : <a href="http://losingfight.com/blog/2007/08/18/how-to-implement-a-basic-bitmap-brush/" target="_blank" rel="nofollow">http://losingfight.com/blog/2007/08/18/how-to-implement-a-basic-bitmap-brush/</a></p>

<p>It makes a much nicer paint stroke. But I've run into a problem. I'm getting a border on the ellipse even though I've set nostroke() while creating the brush tip. It looks fine at low trans, but at high  trans you can see a black border around the ellipse. Where is that coming from? The brush  spacing and transparency displays in the title bar. Use the key '1' to decrease the spacing and use key '2' to increase the spacing. Use '+' to increase the transparency and use '-' to decrease transparency. Space clears the screen:</p>

<pre><code>PGraphics test;
PGraphics Brush;
PGraphics BrushMask;
color paintColor = color(255,0,0);
int oldx, oldy;
float Brushspacing = 0.10;
int Brushtrans = 05;
float leftoverD = 0.0;
String Info;

void setup(){
     size(600,600);

     test = createGraphics(600,600);
     test.beginDraw(); 
     test.background(255);
     test.endDraw();
     BrushMask = createGraphics(27,27);
     BrushMask.beginDraw();
     BrushMask.noStroke();
     BrushMask.fill(Brushtrans);
     BrushMask.ellipse(13,13,25,25);
     BrushMask.endDraw();
     Brush =createGraphics(27,27);
     Brush.beginDraw();
     Brush.noSmooth();
     Brush.noStroke();
     Brush.fill(paintColor);
     Brush.ellipse(13,13,25,25);     
     Brush.mask(BrushMask);
     Brush.endDraw();
     Info = "Brush Spacing:" + Brushspacing + " BrushTraans:" +Brushtrans;
     frame.setTitle(Info);  

}
void draw(){
     image(test,0,0); 

}
void mousePressed(){
     oldx = mouseX - 13;
     oldy = mouseY - 13;
     test.beginDraw();
     test.image(Brush,oldx,oldy);
     test.endDraw();
}
void mouseDragged(){
     float spacing = 25 * Brushspacing;
     if ( spacing &lt; 0.5 )
          spacing = 0.5;
     float deltaX = mouseX - oldx;
     float deltaY = mouseY - oldy;
     float distance = sqrt(deltaX * deltaX + deltaY * deltaY);
     float stepX = 0.0;
     float stepY = 0.0;
     if(distance &gt; 0.0){
          float invertDistance = 1.0/distance;
          stepX = deltaX * invertDistance;
          stepY = deltaY * invertDistance;
     }
     float offsetX = 0.0;
     float offsetY = 0.0;
     float totalDistance = leftoverD + distance;
     test.beginDraw();
     while ( totalDistance &gt;= spacing ) {
          // Increment where we put the stamp
          if ( leftoverD &gt; 0 ) {
               // If we're making up distance we didn't cover the last
               //     time we drew a line, take that into account when calculating
               //     the offset. leftOverDistance is always &lt; spacing.
               offsetX += stepX * (spacing - leftoverD);
               offsetY += stepY * (spacing - leftoverD);

               leftoverD -= spacing;
          } else {
               // The normal case. The offset increment is the normalized vector
               //     times the spacing
               offsetX += stepX * spacing;
               offsetY += stepY * spacing;
          }

          // Calculate where to put the current stamp at.
          test.image(Brush, oldx + offsetX, oldy + offsetY);

          // Ka-chunk! Draw the image at the current location
    //

          // Remove the distance we just covered
          totalDistance -= spacing;
     }  
     test.endDraw();

     leftoverD = totalDistance;
     oldx= mouseX;
     oldy = mouseY;
}void mouseReleased(){
     leftoverD = 0;
}
void keyPressed(){
     if (key == '1'){
          Brushspacing -= 0.05;
          if(Brushspacing &lt; 0.05)
               Brushspacing = 0.05;
     }
     else if (key == '2')
          Brushspacing += 0.05;
     else if (key == '+'){
          Brushtrans += 5;
          if( Brushtrans &gt; 255) Brushtrans = 255;
          BrushMask.beginDraw();
          BrushMask.clear();
          BrushMask.noStroke();
          BrushMask.fill(Brushtrans);
          BrushMask.ellipse(13,13,25,25);
          BrushMask.endDraw();
          Brush.beginDraw();
          Brush.mask(BrushMask);
          Brush.endDraw();
     }
     else if ( key == '-'){
          Brushtrans  -= 5;
          if(Brushtrans &lt; 5) Brushtrans = 5;
          BrushMask.beginDraw();
          BrushMask.clear();
          BrushMask.noStroke();
          BrushMask.fill(Brushtrans);
          BrushMask.ellipse(13,13,25,25);
          BrushMask.endDraw();
          Brush.beginDraw();
          Brush.mask(BrushMask);
          Brush.endDraw();
     }
     else if ( key == ' '){
          test.beginDraw();
          test.background(255);
          test.endDraw();
     }
     Info = "Brush Spacing:" + Brushspacing + " BrushTraans:" +Brushtrans;
     frame.setTitle(Info);     

}     
</code></pre>
]]></description>
   </item>
   <item>
      <title>antialiased edges despite initial call to noSmooth</title>
      <link>https://forum.processing.org/two/discussion/11525/antialiased-edges-despite-initial-call-to-nosmooth</link>
      <pubDate>Wed, 01 Jul 2015 05:05:53 +0000</pubDate>
      <dc:creator>alexR</dc:creator>
      <guid isPermaLink="false">11525@/two/discussions</guid>
      <description><![CDATA[<p>With code below, I am somehow unable to draw crisp shapes despite a call to noSmooth. Something's afoot...</p>

<p>Thanks for any advice.
Alex</p>

<pre><code>    function setup()
    {
        var canvas, buf, img, col;

        canvas = createCanvas(100,100);

        // Draw initial ellipse in buffer
        buf = createGraphics(100,100);
        buf.noSmooth().fill(color(0,0,0)).ellipseMode(CORNER).ellipse(0,0,100,100);

        // Get image representation and filter out black pixels
        col = [0,0,0,255];
        img = b.get();
        for (var x=0; x&lt;100; x++){
            for (var y=0; y&lt;100; y++){
                var a = img.get(x,y);
                if (a[0] == c[0] &amp;&amp; a[1] == c[1] &amp;&amp; a[2] == c[2] &amp;&amp; a[3] == c[3]) {
                    img.set(x,y,[0,0,0,0]);
                }
            }
        }
        img.updatePixels();

        // Render and observe antialiased edge despite the call to noSmooth
        image(img,0,0);
    }
</code></pre>
]]></description>
   </item>
   <item>
      <title>Failing to draw with OPENGL lighting under Ubuntu 14 HP Compaq</title>
      <link>https://forum.processing.org/two/discussion/7134/failing-to-draw-with-opengl-lighting-under-ubuntu-14-hp-compaq</link>
      <pubDate>Thu, 11 Sep 2014 07:12:17 +0000</pubDate>
      <dc:creator>hydrodog</dc:creator>
      <guid isPermaLink="false">7134@/two/discussions</guid>
      <description><![CDATA[<p>I am configuring a number of HP Compaq machines with Core 2 Duo and Intel integrated graphics
I don't have the exact model on me, but I don't think it's too relevant.</p>

<p>OpenGL does not seem to work, for lighting or shading.
the reported error is:</p>

<pre><code>Listening for transport dt_socket at address: 8912
libEGL warning: failed to create a pipe screen for i965
Smooth is not supported by this hardware (or driver)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0, 0x792ba698, refCount 1, unCloseable false]
</code></pre>

<p>It doesn't matter if the display is slow, but is there any way to get OpenGL to work? This isn't new stuff, we are not using shaders here, why should a machine with 5 year old hardware not work?</p>
]]></description>
   </item>
   <item>
      <title>PGraphics with noSmooth() does not draw anything in the first loop</title>
      <link>https://forum.processing.org/two/discussion/1760/pgraphics-with-nosmooth-does-not-draw-anything-in-the-first-loop</link>
      <pubDate>Mon, 02 Dec 2013 05:09:28 +0000</pubDate>
      <dc:creator>amyro</dc:creator>
      <guid isPermaLink="false">1760@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>i got a problem with my PGraphics buffer. If i enable noSmooth, nothing is drawn to the buffer in the first loop. The image remains empty. When i redraw the image everything is working fine. See my example code below:</p>

<pre><code>    PGraphics buf;  

public void setup() {  
  size(800, 600, P3D);  
  buf = createGraphics(800, 600, P3D);  
}

    public void draw() {  
    buf.beginDraw();  
    buf.background((float)200.0);  
    buf.lights();  
    buf.noSmooth();  

    buf.rect(width/2, height/2, 50, 50);  

    buf.endDraw();
    buf.save(".../sandbox_buf.png");

    noLoop();
}

  public void mousePressed() {  
     redraw();      
  } 
</code></pre>

<p>Any ideas why nothing is drawn to the buffer in the first loop?<br />
Thanks for your help!</p>
]]></description>
   </item>
   </channel>
</rss>