Jump to content

BoltBait

Administrator
  • Posts

    15,651
  • Joined

  • Last visited

  • Days Won

    390

Everything posted by BoltBait

  1. I'll tell you one way he "does it"... Rick does not rush to put new features into Paint.NET just because he can. Every feature he includes is only added once it is throughly thought out and perfected from a UI (user interface) perspective. He knows his audience and tunes everything for them specifically. I agree. The Paint.NET UI is a perfectly balanced between the beginner and advanced user.
  2. You should be posting your troubles in this thread: viewtopic.php?f=16&t=2023
  3. One option would be to just hide the tool window. When you want to switch tools, click on the: Tool: v on the 3rd row toolbar and choose a different tool.
  4. [/takes a peek with reflector] Um... no you wouldn't. Trust me. You can always look at my flames plugin source code.
  5. You're welcome. It was just a quick idea. I'm glad it works for you. Yeah, I still need to play with the Tolerance algorithm. I just threw it in there quickly. That's why I said that I still need to tweek it. Sorry, I have not come up with a good algorithm for that scenario. My idea only works for the color white and the color black. I could also do it for red, green, or blue, if you like... but, that's about it right now.
  6. Those sliders show you what color you would get if you move the pointer into that area--that is, if you reduce (move to the left) the amount of red, for example, you'll get blue.
  7. Here is the start of a CodeLab script: #region UICode byte Amount1 = 0; // [1] Color to delete|White|Black double Amount2 = 0.5; // [0,1] Tolerance #endregion void Render(Surface dst, Surface src, Rectangle rect) { double H=0; double S=0; double V=0; byte R=0; byte G=0; byte B=0; ColorBgra CurrentPixel; for (int y = rect.Top; y { for (int x = rect.Left; x { CurrentPixel = src[x,y]; EvanRGBtoHSV(CurrentPixel.R, CurrentPixel.G, CurrentPixel.B, ref H, ref S, ref V); switch (Amount1) { case 0: // White if (V >= Amount2) { EvanHSVtoRGB(H, 1.0, V, ref CurrentPixel.R, ref CurrentPixel.G, ref CurrentPixel.; CurrentPixel.A = (byte)(255*S); } break; case 1: // Black if (V { EvanHSVtoRGB(H, S, 1.0, ref CurrentPixel.R, ref CurrentPixel.G, ref CurrentPixel.; CurrentPixel.A = (byte)(255*V); } break; default: break; } dst[x,y] = CurrentPixel; } } } public void EvanHSVtoRGB(double H, double S, double V, ref byte bR, ref byte bG, ref byte bB) { const double HSV_UNDEFINED = -999.0; // Parameters must satisfy the following ranges: // 0.0 // 0.0 // 0.0 // Handle special case first if (S == 0.0 || H == HSV_UNDEFINED) { byte x = (byte)(int)(V * 255.0); bR = x; bG = x; bB = x; return; } if (H >= 360.0) { H = AngleConstrain(H); } double R = V, G = V, B = V; double Hi = Math.Floor(H / 60.0); double f = H / 60.0 - Hi; double p = V * (1.0 - S); double q = V * (1.0 - f * S); double t = V * (1.0 - (1.0 - f) * S); if (Hi == 0.0) { R = V; G = t; B = p; } else if (Hi == 1.0) { R = q; G = V; B = p; } else if (Hi == 2.0) { R = p; G = V; B = t; } else if (Hi == 3.0) { R = p; G = q; B = V; } else if (Hi == 4.0) { R = t; G = p; B = V; } else if (Hi == 5.0) { R = V; G = p; B = q; } int iR = (int)(R * 255.0); int iG = (int)(G * 255.0); int iB = (int)(B * 255.0); bR = (byte)iR; bG = (byte)iG; bB = (byte)iB; } public void EvanRGBtoHSV(int R, int G, int B, ref double outH, ref double outS, ref double outV) { const double HSV_UNDEFINED = -999.0; // R, G, and B must range from 0 to 255 // Ouput value ranges: // outH - 0.0 to 360.0 // outS - 0.0 to 1.0 // outV - 0.0 to 1.0 double dR = (double)R / 255.0; double dG = (double)G / 255.0; double dB = (double)B / 255.0; double dmaxRGB = EvanMax3(dR, dG, dB); double dminRGB = EvanMin3(dR, dG, dB); double delta = dmaxRGB - dminRGB; // Set value outV = dmaxRGB; // Handle special case if (dmaxRGB == 0) { outH = HSV_UNDEFINED; outS = 0.0; return; } outS = delta / dmaxRGB; if (dmaxRGB == dminRGB) { outH = HSV_UNDEFINED; return; } // Finally, compute hue if (dR == dmaxRGB) { outH = (dG - dB) / delta * 60.0; } else if (dG == dmaxRGB) { outH = (2.0 + (dB - dR) / delta) * 60.0; } else //if (dB == dmaxRGB) { outH = (4.0 + (dR - dG) / delta) * 60.0; } if (outH { outH += 360.0; } } public double EvanMax3(double x, double y, double z) { return (x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z); } public double EvanMin3(double x, double y, double z) { return (x } public double AngleConstrain(double MyAngle) { // Makes sure that 0.0 // Wraps around the value if its outside this range if (MyAngle >= 360.0) { MyAngle -= Math.Floor(MyAngle / 360.0) * 360.0; } if (MyAngle { MyAngle += 360.0; } return MyAngle; } This CodeLab script obviously needs a lot of tweeking and I'll refine it more later when I have more time. Is this getting close to what you want?
  8. Hey! I have an idea... Why don't you just PM him?
  9. Perhaps it is because the font you installed is only Bold and Italic... there is no "normal" version of the font in the download package.
  10. What font is it? Is it something off of dafont.com or another site? If so, give us a link.
  11. Did you restart Paint.NET? It only populates the font drop-down list when you first run the program.
  12. Your new font is probably not True Type (TTF). Paint.NET only supports True Type fonts.
  13. We recently did reorganize the plugin forum and asked many of the more prolific plugin authors to create "Plugin Packs" which we made "sticky" in the plugin forum. This has greatly reduced confusion already. If you are searching for a specific plugin, the Search Page is probably your best bet.
  14. Try this tutorial: viewtopic.php?f=36&t=26974
  15. Are you drawing this "free hand" or is it a photograph that you are manipulating?
  16. Are you drawing this "free hand" or is it a photograph that you are manipulating?
  17. Cussing is a quick way to get yourself banned from this forum. I suggest you read the rules: viewtopic.php?f=20&t=3446
×
×
  • Create New...