Jump to content

Ego Eram Reputo

Administrator
  • Posts

    14,567
  • Joined

  • Last visited

  • Days Won

    264

Everything posted by Ego Eram Reputo

  1. Some progress....... // Name: Box Outlining GPU // Submenu: test // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: // For help writing a GPU Drawing plugin: https://boltbait.com/pdn/CodeLab/help/tutorial/drawing/ #region UICode IntSliderControl Amount2 = 35; // [15,100] Size IntSliderControl Amount3 = 9; // [2,25] Spacing #endregion protected override unsafe void OnDraw(IDeviceContext deviceContext) { deviceContext.DrawImage(Environment.SourceImage); // preserve background // find out where our selection is located RectInt32 selection = Environment.Selection.RenderBounds; // variables int boxSize = Amount2/2; int Spacing = Amount3+1; int doubleSpacing = Amount3*2; int thickness = 2; int rndHeight, rndWidth; int step = boxSize*7/10; // define your brush and stroke style ISolidColorBrush fillBrush = deviceContext.CreateSolidColorBrush(LinearColors.LightGray); ISolidColorBrush outlineBrush = deviceContext.CreateSolidColorBrush(LinearColors.Black); IStrokeStyle boxStrokeStyle = deviceContext.Factory.CreateStrokeStyle(StrokeStyleProperties.Default); // setup drawing mode deviceContext.AntialiasMode = AntialiasMode.Aliased; // or .PerPrimitive Random rnd = new Random(); for (int y = selection.Top; y < selection.Bottom; y += step) { for (int x = selection.Left; x < selection.Right; x += step) { //if source pixel is opaque ) rndWidth = rnd.Next(Spacing, doubleSpacing); rndHeight = rnd.Next(Spacing, doubleSpacing); deviceContext.FillRectangle(x-rndWidth, y-rndHeight, boxSize, boxSize, fillBrush); deviceContext.DrawRectangle(x-rndWidth, y-rndHeight, boxSize, boxSize, outlineBrush, thickness, boxStrokeStyle); } } } I haven't figured out how to poll the source pixel yet, so I'm just filling selections at the moment. Still, I think looks great!
  2. Seen the latest API documentation? https://paintdotnet.github.io/apidocs/api/index.html There are a great many effects you can access and chain together. For example, see https://paintdotnet.github.io/apidocs/api/PaintDotNet.Effects.Gpu.html
  3. Hadn't considered that. I'll have a look and see if I can make six or seven boxes work. Nice! Thank you @BoltBait Thanks Red. Quite right. I will change of course. The posted code was something from a year or so ago (I just had another play with it to remember where I got to).
  4. I could use a little help on this one I'm trying to recreate an outlining effect I saw on Watabou's one-page dungeon generator. I want to surround an object with little gray boxes something like this image. I had a very rough stab at it. Basically my plan was to step through the image and test the transparency of the target pixel. If it was transparent, throw a little box around it. The code I wrote trying to hack this out was truly awful. Results were ......promising!? (at least it was working right 😁) Does anyone want to help me write something a little more elegant?
  5. I disagree. I think this plugin is too good to lose. If you're willing to release the source code I'm sure someone will recompile and publish it.
  6. The easiest way to duplicate a Shape is this: Draw your Shape on a blank layer Duplicate the layer It's one extra click for each duplication.
  7. Thanks @Tactilis. I can't see Bayer as an option in AdvDith. Simulate Color Depth does have Bayer Ordered 8x8. Beware this plugin crashes if you attempt to use the Stucki dithering method.
  8. @xod - I've just added this to the plugin index in the April 2024 update. I've belatedly realized it is still pending the rewrite Rick suggested. Are you intending to re-release it soon?
  9. April Update One new plugin this month: Warp text along a path xod Writes text along a user-specified path. The plugin uses the SkiaSharp library, so you need to put all three files from the ZIP file into the Effects folder. *please note* this plugin is currently undergoing revision/rerwrite to make it conform to standards. There is also the inclusion of an older plugin - which had been missed (thanks @toe_head2001) Alpha Mask (aka Apply Alpha Mask) from @BoltBait's Plugin Pack.
  10. I tried to find a Bayer dither, but couldn't locate one. https://forums.getpaint.net/PluginIndex?keywords=dither&author=All+Authors&type=0&status=7&compat=3&order=title&menu=All+Menus&release=0
  11. ^^ Confirmed. Crash seems to be related to setting the Dither Method to Stucki. Error message:
  12. ^this. Make the selection & hit the M key twice to enter "modify-the-selection-mode". Click & drag the nubs and/or rotate the selection border the until you have the perfect alignment of the selection rectangle. Press M once more to revert to normal "Move" mode so you can drag/rotate/resize the image region. Or, if you want to modify the selection border on the fly..... Hold down the second mouse button (in addition to the first)! The selection border can be dragged around as you are making the selection. In this mode, the keyboard arrow keys move the selection border by one pixel (or 10 pixels if the CTRL key is also held down) for pixel-perfect placement.
  13. If you have a library of components as images, TileWorld might be useful.
  14. We try to make it as easy as possible. As @toe_head2001 and @Pixey have explained, you can change the language in the Paint.net settings. The paint.net documentation can also be translated:
  15. Have you considered installing the MS Store version? Updates magically happen in the background.
  16. Workaround: Draw your line on a new blank layer. Activate the Magic Wand tool 🪄 Click on the transparent area (not the line) to select everything except the line Invert the selection with Ctrl + I Activate the layer you want the line removed from Press the Delete key Hide or delete the layer you drew the line on. Yes, try this brand new plugin by @xod:
  17. Google Translate: Reducing the image size reduces the number of pixels. If you want to print the photo at a smaller size, try increasing the DPI (Dots Per Inch) setting in the printing dialog. If you want the file size to be smaller, choose Save As and specify the JPG extension, then lower the quality setting. Specify a different file name so you don't overwrite the original image.
  18. There may still be files lurking around. Do try the link that @Tactilis suggested:
  19. Make yourself a custom palette: https://www.getpaint.net/doc/latest/WorkingWithPalettes.html Selecting new colors is as easy as left or right clicking the palette (#5 in this image)
  20. Resizing the image will affect the logo size. Correct. Changing the canvas size will not affect the logo size. It will either place more space around the image (canvas = larger) or crop the edges (canvas = smaller). If you're seeing the logo become smaller then it is due to the zoom level changing to squeeze the enlarged image into the view window. Ctrl + B resets zoom to 100%.
  21. You can combine the Spacebar and keyboard arrow keys. Unfortunately this is not per-pixel but instead scaled inversely by the amount you have zoomed in (large zoom = smaller movements. Small zoom = large movements). At 100% zoom each combination keypress results in a 10px movement. At 600% zoom you get somewhere between 1 to 2px movements. I had to zoom in 1000% before I consistently get 1px movements. This may be scaled by your system - so some experimentation might be worthwhile. Adding the Ctrl key multiplies the movement x10.
  22. Try Ctrl + A (select all the current layer) then M (Move tool) then use the keyboard arrow keys for per-pixel shifting. Pro tip: Ctrl + Arrow Key = 10px movement per button press.
×
×
  • Create New...