Jump to content

geist_

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

geist_'s Achievements

Rookie

Rookie (2/14)

  • Collaborator
  • Reacting Well Rare
  • One Year In
  • First Post
  • Week One Done

Recent Badges

1

Reputation

  1. Thank you! This is exactly what I needed, I have been struggling til now to get ConfigDialog and ConfigToken to work.
  2. // Name: // Submenu: // Author: // Title: // Version: // Desc: // Keywords: // URL: // Help: #region UICode #endregion class MyForm : Form { public MyForm() { this.InitializeComponent(); } System.ComponentModel.IContainer components = null; protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } private void InitializeComponent() { //UI stuff this.components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 450); this.Text = "MyForm"; } } void Render(Surface dst, Surface src, Rectangle rect) { global::System.Windows.Forms.Application.EnableVisualStyles(); global::System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); global::System.Windows.Forms.Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.Run(new MyForm()); } Tried it like this, and it works only the first 3-4 times you call the effect, after the 3-4 time, paint.net crashes the it displays the following exception: In the code above I am calling Application.SetCompatibleTextRenderingDefault() before i call Application.Run, so why is it not working if you keep using the effect more than 3 or 4 times? I am running this in a Single Render Call effect plugin
  3. I'm very glad you pointed this out, my script has a Drop-Down List Box options control, and every time i change that option, it gets called with the previous option again, then with the new one. Do you happen to know a way to prevent this? perhaps @BoltBait you could know? Last question i promise
  4. oh so is that it? multiple threads can't write to the same variable? nvm then lol What bugs me, is that even when I tried running it with Force Single Render Call (or building it in a .dll with single render call enabled) it still called Render multiple times
  5. I have read the tutorials, but you seem to not have read my post? I am fully aware of that - however - what the tutorial doesn't mention is that, those ROI are only from the "visible" selection from the perspective of the user.
  6. Thank you, but that isn't what i'm trying to achieve. My main question was how the Render() function was called, since every time I ran my script, the result was based off my view of the image and not the selected area.
  7. I already tried working with Single Render Call . It still returns an amount based off my view
  8. 1. No 2. Yes 3. I want to work on CurrentPixel for every pixel in the entire selection
  9. ROI visible get priority, alright, but the rest of the ROI's never get passed as rect? otherwise how can i get each pixel from the current selection?
  10. int num; void Render(Surface dst, Surface src, Rectangle rect) { for (int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { num++; //for every pixel in your selection, increment this num variable } } #if DEBUG Debug.WriteLine(num); #endif } If you take a look at this code, the num variable should return the amount of pixels you have selected. At first it only worked some of the time, and was confused as to why. But after some messing around I found out rect only contains the selected area visible to the user: For example in a 64x64 image: Running that code with the full image selected and with the full view of it Will return the correct number of pixels, 64 * 64 = 4096 But running the code with only a part of the image visible (while still selecting it whole): Will return the wrong number of pixels, because the effect only works on the currently visible selected area, despite still having the entire image selected. Is there a way to get around this? without using src.Bounds and forcing a single render call (in order to work with none-rectangle selections)
  11. @toe_head2001 @ANONYMISS I think the reason it crashed is because it's supposed to store the file in C:\Users\name\Documents\paint.net User Files\Palettes\ which i thought was made by default. Also @Ladybug thanks for checking it out, it means a lot! The main reason i made this was for characters/item sprites, not really for landscapes, and yes, i will change it so the user can choose a name for the file before it saves it. Here's the source code: MakePalette.zip
  12. VERSION: Only checked for paint.net version 4.2.15. Adjustments > Make Palette(.dll) As the name suggests, from the current selection the plugin/adjustment will make an "UntitledPalette.txt" file in your \Documents\paint.net User Files\Palettes with each color taken only once. It also displays how many unique colors are in the palette. MakePalette.zip
×
×
  • Create New...