Jump to content

moc426

Members
  • Posts

    318
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by moc426

  1. http://paintdotnet.12.forumer.com/viewt ... 3694#43694
  2. lol funny. Don't worry pyro, the plugin works, small issues always pop up.
  3. Yah until Rick does something like this... (where it really should be, hint hint hint COUGH COUGH HINT)
  4. Yes the top and bottom. Cool, will check it out. Are you talking about at the top and bottom? That was on purpose. Anyway, I am in the middle of writing up a tutorial. That may be done by today. I'll post here when I put it up...
  5. That is very good, how did you do this? It has some incorrect dots I think but they are minor, the result is supposed to be viewed as a smaller size I believe so you can show best.
  6. Yah if I can make it do 2 functions same time then I can change the interface, which it doesn't currently do. That would need another row or column of buttons though, because you may want to just center (left to right) and not middle (top and bottom) or 3 center buttons. meaning center vertically, center horizontally and center both.
  7. Source added now. What about sharing the code so people can help you?
  8. I added 2 more previews to demonstrate better the use of align to selection. Glad it will be helpful to you guys, it is very useful for myself.
  9. Ok here it is, this plugin will align your drawing on the canvas OR to your selection. Let me know of any bugs, comments ... etc. updated 06/17/2007 v1.5.1 performance tweak. barkbark00, I think you should see the performance issue gone, but let me know. updated 06/13/2007 v1.5 - the download link should give you the new dll. the source is not latest, will add that later. Added horizontal, vertical and both options. New user interface. Default option is Middle Center. Better Performance??? Preview still doesn't work right but you don't really need a preview, you know what will happen! But maybe one day I can fix that. NOTE: If the preview is messed up, click the same option again, it should fix the preview. If you find bugs let me know ... I will see what I can do. Download the Zip file at the bottom of this post (old link: download dll) edit: added source, this source is old. latest source added on 10/15/2007, forgot to add this a while ago. download source. Currently you can align Left, Center, Right, Top, Middle or Bottom. To do combinations such as Top Left, you need to run the plugin twice, once for each mode. The preview for Top, Middle and Bottom is screwy, I still get very confused with the way pdn splits the image into rectangles and runs them in parallel so the preview ends up erasing some parts it shouldn't but when you apply it works correctly. Maybe I can get some help from Rick himself on this later or anyone else who may be able to. Here are some screenshots: Original Aligned Left Aligned Top Left Center and Middle Download Here: AlignPlugin.zip
  10. Not quite sure what you mean here, but if you mean I used your code as reference, I actually used boltbait's GridMaker for this one. If it makes any difference, I have referenced your code for a new plugin I am working on, as well as other code posted here by other members. I think dragonpyro wants a border around a circular selection, pyrochild's shape thing plugin can do that -> http://paintdotnet.12.forumer.com/viewtopic.php?p=43191 I felt I had something to do with it! Try this with codelab: (only for square/rectangle selections/images)
  11. Looks like it is crashing like you said it may be. Yah its crashing cause of the png icon. When I had it return null for the icon, it runs. Strange. Thanks for your help bolt, I am not sure what the icon issue is, I will check on that later, but if you see the problem, I'd appreciate any input on that. Pdn picks it up without the icon correctly.
  12. Do you want me to post the entire solution or just the effect code?
  13. I can't seem to get this to work, I have compiled a dll in c# express. Paint.net just won't pick up the effect. Should I post my solution files here so someone can help or any other ideas? I used the effectplugin template, referenced the paintdotnet.core dll. Thanks
  14. Keep up the good work! Added to my list of "Todo" projects. First though, bug fixes on shape-thing, added features on curves+, and then a super-secret classified plugin that everyone will love, even though I've been repeatedly told it's not possible. AND THEN: a plugin manager. Gimme a month.
  15. Awesome, much more than the border effect I did. The patterns are good and the caps options allow for much more cooler effects with distorting ... etc. Nice job. Only thing it needs now is to be able to draw around a lasso select or any selection, that is really the goal that I had in mine, so I can stroke a selection. Edit, bug? Anti-aliasing option, on even widths, left and top sides are blurred or transparent. It doesn't do this on odd widths.
  16. Much better result, pyrochild is a wise one.
  17. Sorry didn't see your question. Sure you can use it.
  18. Ok relax. I was just explaining the weird thing that happened when I did that. What you said makes sense, an effect should not draw outside its selection. I wouldn't call it a bug, it is perhaps an illegal operation to be performed on an effect. Any case, thanks for the information on the operations of paint.net effects and history window.
  19. Seems so, I was trying to do that. But I was able to do it, was more of something with a bug in pdn. It would draw outside the region but not show it, but if I hit undo in the history window then redo, the drawing appeared. To reproduce it. Start with new image, add new layer, draw a rectangle selection on new layer, should be smaller than the canvas size, so that each side of the rectangle selection is more than 25 pixels away from the edge of the canvas. Go to codelab and paste this code: (make sure to hit build when you paste it). int Amount1=25; //[1,25]Thickness int Amount2=0; //[0,1]Line Dashed void Render(Surface dst, Surface src, Rectangle rect) { // User Interface elements int GridSize = Amount1; bool dashed = (Amount2 == 1); // Other variables PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); ColorBgra CurrentPixel; ColorBgra PrimaryColor; ColorBgra SecondaryColor; // Get the current brush width bool fill = false; // Grab the primary and secondary colors (swapping if specified in the UI) PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; if ( dashed ) { if ( GridSize == 1 ) { GridSize = 2; } } // Loop through all the pixels for(int y = rect.Top-GridSize; y < rect.Bottom+GridSize; y++) { for (int x = rect.Left-GridSize; x < rect.Right+GridSize; x++) { // Only work with a pixel if it is selected // (this handles convex & concave selections) // Get the source pixel CurrentPixel = src[x,y]; fill = false; if ( ( x < selection.Left ) || ( x >= selection.Right ) ) { if ( ! dashed ) { fill = true; } else { int pos = ( selection.Bottom - ( selection.Bottom - y ) ) % (GridSize-1); if ( ( pos == 0 ) || ( pos < GridSize/2 ) ) { fill = true; } } } else if ( ( y <= selection.Top ) || ( y >= selection.Bottom ) ) { if ( ! dashed ) { fill = true; } else { int pos = ( selection.Right - ( selection.Right - x ) ) % (GridSize-1); if ( ( pos == 0 ) || ( pos < GridSize/2 ) ) { fill = true; } } } if ( fill ) { CurrentPixel.R = (byte)PrimaryColor.R; CurrentPixel.G = (byte)PrimaryColor.G; CurrentPixel.B = (byte)PrimaryColor.B; CurrentPixel.A = (byte)PrimaryColor.A; } // Save the (modified?) pixel dst[x,y] = CurrentPixel; } } } hit ok, doesn't look like much happened, on your history window, click on New image again, then click on the code lab in the history you had just undone. Magic! it does exactly what I wanted it to do. That is draw a border outside the selection that is 25 pixels wide.
×
×
  • Create New...