Jump to content

Ego Eram Reputo

Administrator
  • Posts

    14,567
  • Joined

  • Last visited

  • Days Won

    264

Posts posted by Ego Eram Reputo

  1. Here is where I find Codelab:

    CodelabLocation.gif

    You may wish to blur-out what is probably a plugin in development.

    I don't know where ThreadMarker came from either. I thought it was from a plug-in pack and have never used it.

    My post was to direct Hakatu to look in the right place for codeLab. He said he didn't have the Advanced Submenu. Isn't this where CodeLab now resides?

  2. Hiya everyone...I feel like such a n00b for asking this, but does anyone know how to make a really nice looking heart with paint.net.

    I have been trying to make one forever now...and I can't even get close, plz help

    No problem!

    1. Click this link (WhichSymbol) and download the (original) WhichSymbol plugin (found at the foot of the first post).

    2. Unzip it and then place the *.dll file into the /Paint.Net/Effects folder.

    3. Start PDN.

    4. Choose the colour you wish the heart to be (red in my case).

    5. Go to Effects Menu > Render & click on the WhichSymbol plugin.

    6. Enter these values: Character 89, font size to suit, Webdings (=1 on the slider), to get this result:

    Heart.gif

    Good luck!

  3. It only allows one to select (or type a number) for a character upto 125

    Which reminds me of the old ASCII limit of 124

    Related?

    Anyhoo - as I wanted little arrows and side facing triangles to bung over the top of

    screen shots of medical software - I can't use it; which a pity really. I liked the idea.

    Did you check out the original (WhichSymbol) or the enhanced version (WhichSymbolPlus)?

    If you view the first screenshot on my first post, you'll see that WingDings has a range of arrows. Wingdings2 & 3 have even more. The Character slider has an upper limit of 255 (original WhichSymbol) - you might be able to guess that from the screenshot. I am bemused as to why you're unable to select a character beyond 125. I'll look into this....,

    Thanks for your feedback.

    [edit]

    chrisjw37: download the original version of WhichSymbol (click the link on my sig) and all should be well. The newer version of WhichSymbol(plus) is having one or two birthing problems which should be resolved very soon. Until then, grab the original.

    [/edit]

  4. I reccomend attaching the modification to the first post rather than linking to the direct post, as this will allow users to easily select which one they wish to download.

    A couple of minor problems with your new version of the plug-in:

    1. Spelling error in "Character" :wink:

    2. Column numbering uses the selected font, so if the font doesn't have digits, the column offsets are not numerals. See Webdings/wingdings selections. You might want to tickle the font used for the column offsets (top) to the same one as the row offsets (left).

    If you want to make these minor changes, I'll then provide the link in my original post.

  5. Here is my modification of this plugin that supports custom fonts and a (hopefully) simpler dialog. This ZIP only contains the assembley, I will leave the decision to EER over whether to publish the source.

    I've already published the codelab source, so these modifications are entirely yours. Please feel free to make the source available as you wish.

  6. That is not available through IndirectUI.

    Sure it is. Use the StaticListChoiceProperty.

    string[] fontNames = ... you figure this part out ...;
    StaticListChoiceProperty fontNamesProperty = new StaticListChoiceProperty(YourPropertyName, fontNames);

    I do all my development in CodeLab, and I've never seen a combobox used codelab source files before. I guess my question is....., can this be done in CodeLab?

  7. It would be nice, if the black fields of the board would have a different color from the black pieces and be solid. So everyone could more easily do individually styled images. The colors of the pieces are also not so easy editable if you would for example want a texture to fill them, you would want to select all white pieces at once and do a photo flood fill. But I don't know a good solution for that atm... white pieces just should be white :P maybe white rgb(254,254,254) in contrast to the white of the board rgb(255,255,255)

    I also like chess ;)

    We're working with the Chess Merida font here, so all we can choose is the colour of the font. The pieces and squares are not individual images which are able to be edited. Change the color of the diagram by selecting a different primary color before running the plug-in.

    I suppose if you were really clever you could draw the board only on another layer, and then use this as a mask to change the squares under the pieces. This is a bit out of my league..,

    @ Mike: No, Simon has it correct. ChessFEN just draws diagrams.

  8. Note: if you try to "build" a FEN string by typing it into the window, don't be surprised if the plug-in breaks. You have been warned! I suggest you paste in complete FEN strings and then uncheck the "Show Initial Position" checkbox.

    I'd suggest putting your parsing of the string around a try/catch block, and if an exception is raised just default to string.Empty. You can actually use the static Do.TryCatch() method to simplify this.

    I'm using this technique to perform some error checking, but its a bit flaky. E.G. if you paste in a FEN string and remove a random character from the middle, the parsing routine will give you an error (in RED text no less :shock: ).

    Is it possible that my attempts at more global error checking were thwarted by attempting to nest Try/Catch blocks?

    [edit]

    @ Rick & Simon: Thank you for your suggestions which have been incorporated into the new version of ChessFEN (see original post).

    [/edit]

  9. I have played chess many times :mrgreen: , but i didn't know about this FEN stuff. Where can I get more FEN strings?

    Thanks for the plugin!

    You can build FEN strings from scratch, but its a bit of a pain. Many chess software programs will allow you to export a given position as a FEN string. This is how I get them:

    Chessbase Lite: [with your selected position showing in the game window] Game menu>Setup position>Copy FEN string (This is now held in an internal format, so you need to paste into a move comment. Now you can select the text and copy/paste it into any text editor)

    EPD strings should also work as they Extend the basic FEN string structure. I'm sure if you did a quick Google you would find many positions available.

  10. Confession: I'm a chess nerd :oops:

    I'm regularly drawing chess boards and chess diagrams for analysis and I thought to myself "wouldn't it be cool if I could do this in Paint.Net?". Well, now you can!

    Introducing ChessFEN (Updated 13 July 08)

    Description and function of the plug-in:

    Parses a FEN* string & draws the resultant chess position using the Chess Merida font. It is therefore ESSENTIAL to have Chess Merida font installed before running the plugin! You can get the Chess Merida Font here: http://www.enpassant.dk/chess/fonteng.htm#MERIDA

    *Forsyth-Edwards Notation (FEN) is a notation for describing chess board positions. The purpose of FEN notation is to provide all the necessary information to restart a game from the given position. Wiki FEN for more information: http://en.wikipedia.org/wiki/FEN

    The FEN string for the initial position of a chessboard looks like this:

    rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

    Here’s a sample positron for you to try (White to move and win):

    r3k2r/pb1nqppp/1p2p3/8/P1BN4/2P5/5PPP/R2QR1K1 w kq - 0 0

    Configuration of the plugin couldn’t be easier:

    Board Size: sets the size of the board – obviously!

    Show Coordinates: Toggles the algebraic coordinates around the board on & off

    Show Game Info: Toggles additional game info (who is to move, castling rights, ep square) on or off.

    Use Initial Position: When checked, the initial chess position is shown. When unchecked, a FEN string is parsed from the window below.

    [edit]

    New 13 July 08! Draw Board Only: Draws a blank board, with or without coordinates.

    [/edit]

    Ya just gotta see it in action don't ya? Well, here you go...,

     

    First off, showing the initial chess position:

     

    Chess_FENUI.png

     

    Secondly, showing a FEN string in action:

     

    ChessFEN.png

    [edit]

    Previous incarnation of ChessFEN would break if you tried to build a FEN string by typing it directly into the textbox. This is no longer the case!. I have rebuilt the plugin as per the suggestions from Rick and Simon below. So now you can build a FEN string from scratch by typing directly into the textbox. Thanks guys for your suggestions.

    [/edit]

    Thanks to BoltBait for your encouragement, and of course, codelab :D

    Enjoy :!:

    Note: This plugin is now housed in my plugin pack http://forums.getpaint.net/index.php?/topic/110145-eers-plugin-pack/

  11. Do you mind if I post a bit of a mini tutorial in here explaining how to add new font types and compile in Code Lab? I know that is the first thing I did with your code for all of my Dafont downloaded dingbats.

    I don't mind at all, but I think a new topic might be in order? You're probably best slotting it into the Effects/API forum.

  12. Plus this time round, I used a better file storage provider.

    You can just attach the *.zip file to the original post. See the bottom of the post editor, just under the submit button is a file attachment area. click the browse button to upload directly from your computer and attach to the post. :)

    I'm trying to get my head around v1.1 which wll include a check box to 'Make Transparent' as opposed to 'Make Opaque'.

    Coding a checkbox is reasonably easy once you know how. Check out my WhichSymbol code here for checkbox syntax: viewtopic.php?p=194899#p194899

    Thanks for the plugin!

  13. Found a bug of my own making!

    The final column of symbols was not being drawn when the "Show All" mode was being used. See the top image in my first post, the top row ends with symbol 31+14=45, but the second row starts with symbol 46+1=47. Thus symbol 46 was missing (the missing link).

    The *.zip file has been updated to correct this and the source listed above amended. I'm not going to change the images because I'm sure you all get the idea.

    I only found this because I actually wanted to use a symbol I knew existed and couldn't find it - you can imagine my frustration as I searched for it!

  14. If this is CodeLab created than I want src.

    Mike, your wish is my command (well, a list of commands anyway....,)

    This is purely an exercise in getting-it-done, and should not be read as an example of best coding practice :!:

    Feel free to ask if there is anything you want explained.

    /*==============================================================================
    WhichSymbol.cs 
    (c) 2008 Ego Eram Reputo 
    
    Description: Draws a selectable symbol from the Webdings/Webdings fonts. 
    
    ==============================================================================*/ 
    #region UICode
    int Amount1=42; // [32,255] Character
    int Amount2=150; // [8,255] FontSize
    int Amount3 = 1; // [1,4] Webdings Wingdings Wingdings2 Wingdings3
    bool Amount4 = true; // [0,1] Show Entire Font
    #endregion
    
    void Render(Surface dst, Surface src, Rectangle rect)
    {
    
    // Init variables and settings
    
    string symbol;
    
    Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); 
    
    Graphics g = new RenderArgs(dst).Graphics;
    g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
    g.Clip = new Region(rect);
    ColorBgra PC = (ColorBgra)EnvironmentParameters.PrimaryColor;
    SolidBrush B1 = new SolidBrush(Color.FromArgb(PC.A, PC.R, PC.G, PC.);
    Font F1 = new Font("Webdings", Amount2);
    Font F2 = new Font("Wingdings", Amount2);
    Font F3 = new Font("Wingdings 2", Amount2);
    Font F4 = new Font("Wingdings 3", Amount2);
    
    Font F7 = new Font("Arial", 10); 
    
    Font F11 = new Font("Webdings", 16);
    Font F12 = new Font("Wingdings", 16);
    Font F13 = new Font("Wingdings 2", 16);
    Font F14 = new Font("Wingdings 3", 16); 
    
    // Clear the canvas by copying existing image (source) to destination
    for(int y = rect.Top; y < rect.Bottom; y++)
    for (int x = rect.Left; x < rect.Right; x++) 
    dst[x,y] = src[x,y]; 
    
    // draw a single symbol if we are not drawing the whole lot
    
    if (Amount4==false)
    {
    
    switch (Amount3)
    {
    case 1: 
    symbol = Convert.ToString((char)Amount1);
    g.DrawString(symbol, F1, B1, selection.Left, selection.Top); 
    break;
    
    case 2: 
    symbol = Convert.ToString((char)Amount1);
    g.DrawString(symbol, F2, B1, selection.Left, selection.Top); 
    break;
    
    case 3: 
    symbol = Convert.ToString((char)Amount1);
    g.DrawString(symbol, F3, B1, selection.Left, selection.Top); 
    break;
    
    case 4: 
    symbol = Convert.ToString((char)Amount1);
    g.DrawString(symbol, F4, B1, selection.Left, selection.Top); 
    break;
    }
    
    }
    
    // Or if we are drawing them all...,
    
    if (Amount4==true)
    {
    
    // Start with a clear the canvas 
    for(int y = rect.Top; y < rect.Bottom; y++)
    for (int x = rect.Left; x < rect.Right; x++) 
    dst[x,y] = src[x,y]; 
    
    // loop to write top character codes
    
    for (int File=1; File<=15; File++)
    {
    symbol = "+" + Convert.ToString(File);
    g.DrawString(symbol, F7, B1, selection.Left+(File*32), selection.Top+1*16);
    }
    
    // loop to draw all characters
    for (int Rank=0; Rank<=14; Rank++)
    {
    for (int File=0; File<15; File++)
    {
    // Draw characters
    switch (Amount3)
    {
    case 1: 
    symbol = Convert.ToString((char)(32+(Rank*15)+File));
    g.DrawString(symbol, F11, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16));
    break;
    
    case 2: 
    symbol = Convert.ToString((char)(32+(Rank*15)+File));
    g.DrawString(symbol, F12, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16));
    break;
    
    case 3: 
    symbol = Convert.ToString((char)(32+(Rank*15)+File));
    g.DrawString(symbol, F13, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16));
    break;
    
    case 4: 
    symbol = Convert.ToString((char)(32+(Rank*15)+File));
    g.DrawString(symbol, F14, B1, selection.Left+((File+1)*32), selection.Top+((Rank+1)*2*16));
    break;
    }
    }
    // draw the number codes
    symbol = Convert.ToString(31+(Rank*15));
    g.DrawString(symbol, F7, B1, selection.Left, selection.Top+5+((Rank+1)*2*16));
    }
    }
    }
    

  15. Thanks.

    I was thinking of making this a while back.. but I know no C++.

    :lol:

    Anyway.. thanks. :D

    I wrote this with codelab, which uses c# I believe. To be honest I find c# remarkably easy to understand and would recommend you grab codelab and go through some of the source files. You might find yourself coding plugins before you know it. :wink:

    I am always happy to release the source (if requested), though I have to admit a certain brute-force style of getting things to happen rather than any coding finesse :)

  16. Ok, two days to go and no one wants to be first. So here goes....,

    I call these my Glow-In-The-Dark-Icons:

    GlowInTheDarkIcons.jpg

    I'm using symbols from the webdings and wingdings font for the base and applying simple effects from there. [edit] I have just released the plugin I used to create the symbols, you can find it here: WhichSymbol [/edit]. The lower images show the icons at their planned 64x64 pixel size (the black box is 64x64 to give an idea of scale).

    I often need to wring a few quick icons out in quick time and this is my usual method. If you can't figure out which icon is which, I've not done my job very well have I ? :(

    Surely you guys n gals have something better to show off by now?

  17. Updated 12 December 2010 - 'Recent History' buttons! B)

    Update 24 October 2010 - New UI

    WhichSymbolPlus allows a symbol or character to be chosen and applied to the canvas from any installed font.

    Thanks to these guys for their help:

    • Pyrochild for his help with the XML loading & saving.
    • Simon Brown who revised and recoded the original codelab plug-in, and was most generous with his time and source.
    • BoltBait for the TextRenderingHint!

    You will find this plugin located in the RENDER submenu.

    (New) When you commit a character to the canvas (by clicking OK), the character is saved to the upper most 'History" button (the contents of the other buttons cascade downward). You can easily reproduce the character by running the plugin again and selecting the appropriate 'History' button. Note that the anti-aliasing setting is not saved, nor the color used (the plugin always uses the current primary color).

    This is the fourth incarnation of this plugin. Here's how the new UI looks....,

    Which_Symbol_Redux2.png

    The UI explained:

    • Select or change a font by clicking on the font name.
    • Choose your symbol by clicking directly on it (it will appear in the preview area and also on the canvas). Click OK to commit the symbol to the canvas.
    • Anti aliasing checkbox chooses between smooth & pixelated.
    • Symbol size is changed with the up/down arrows or by typing a number into the size box. Measurements are in pixels (maximum is 1000).
    • (New) Quickly recall any one of your 10 most recently chosen characters by clicking on one of the 'History' buttons.

    To install the plugin, download my Plugin Pack and unzip it. Run the *.exe installer (written by BoltBait). Restart paint.net.

     

    • Upvote 5
  18. Hi I think this is a great plugin since with this I can have different width, height in my grids.

    But I miss one option; I want to be able to choose the width of the lines used to draw.

    I really would appriciate if you could make this.

    Sorry that is beyond the algorithm I'm using to draw the cells. You should investigate Madjiks Gridmaker plugin as this will allow you to set height, width and brushwidth. here's the link: Grid Maker Plugin (2007/05/24) v3.0 http://paintdotnet.12.forumer.com/viewtopic.php?t=4879

×
×
  • Create New...