Jump to content

denverpotsmoker

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by denverpotsmoker

  1. Muchos Gracias Rick Brewster!

     

    I'm almost certain that "layer technology" is missing from many modern programs.

     

    I don't know how teachers are expected to grade electronic papers without it.

     

    In addition, digital editing of text documents would be much easier with visible/non-visible layers.

     

    OFFTOPIC:

    I myself am working on a font that has more editing characters than just new paragraph:

    new document = ND! (with a circle around it) =ALT+051

    delete = DEL

    R! = Research (with a circle around it)

    SP? = Check spelling

    "STAR" symbol = important

    * = annotation (high astrick)

     

    ....imagine if I could insert them in a layer above my text! OMG!

  2. I was noticing that .pdn saves layers.

     

    That got me thinking about "layers technology" and I was wondering what paint.net developers thought about this subject.

     

    Here's some questions:

    01. who first thought of layers for use in graphics programs?

    02. why don't (do you think) other types of programs use layers?

     

    The second question is the most important to me...

     

    For instance, text editors could use layers so that copyediting marks could be put into the file, without changing the original text. These marks could be hidden similar to the way paint.net layers work...and yet that isn't in any text editor that I know of.

     

    Just wondering...thanks.

  3. Yeah, I pretty much "gave up" on graphics programming after the Apple IIe. I tried some on my Atari 800XL, but the graphics just didn't look as good. I was pretty young at the time (elementary school).

     

    Check out my new module template (I put them in folders then have a batch file paste them in the order required)...part of what I call "structural commenting" using ascii art...you delete the // line numbers for actual code, but the concept is kept for reference both in program code and for other coders.

    saturn5-ABBV--template v4.txt

  4. You really shackle creativity when you tell someone how to think or how they can express their thoughts. Luckily, you can work around such barriers with languages like XLISP and C#, to really accomplish your vision.

     

    Kudos to paint.net developers for supporting C# instead of python/java/etc.

  5. Yeah, back then structural commenting was, like, impossible and stuff.

    I'm guessing getting a print out of your code was a pain, though probably possible.

     

    My mother said one of the biggest problems with coders back then was them misorganizing their (code) punch cards.

    The operators would then have to get them to remember how to put the cards in order over the phone.

     

    Yeah, disorganization is very bad for computers. Today we have folders and files to help organization.

     

    I never got much into assembly programming. I dunno why.

     

    Oh yeah, pretty sure using goto's would compile quicker due less replacement coding in compilation. That's

    pretty significant.

  6. If you look at the historical context of Dijikstra's paper, I think he might have been right.

    Fact 01: Programmers often had to time-share computers, meaning that one glitch or non-ending loop could cost thousands of dollars

                  AND a loss of allocated time on a computer.

    Fact 02: Many financial institutions also time-shared mainframes, so one non-ending loop could cost hundreds of thousands of dollars.

    Fact 03: Being in such a "time-sensitive" coding environment, if a bad goto needed to be found, many programmers would have to work

                  on debugging it. Thus, sloppy/unformatted/undocumented code could cost a ton of money.

     

    Those would be very "harmful" things back then.

  7. @ArgusMagnus

    That's what I was saying.

     

    They could have easily suggested wait loops using gotos, but they (the magazine/book code writers) kept telling everyone to use FOR-NEXT loops.

     

    FOR-NEXT Loops were new then, and (I guess) it just made it so easy to do (as compared to making a wait loop using goto), that I guess everyone just jumped on that bandwagon and used FOR-NEXT for those doomed wait modules...to their own program's eventual deprecation.

     

    I think it is sad, and probably the reason I prefer to make my own looping constructs to this day.

  8. Well, grouping symbols are probably better done using structural commenting (IMO).

    //=====================LOOP01: start

     

    //=====================LOOP01: end

     

    The hierarchal structure could be good, but what if someone needed to "figure 8" through code?

     

    All I'm saying is that the "computing world" lost a whole generation of programs due to that FOR-NEXT (wait)

    code from the early 1980s. Who's to say if that was a bad thing or not as those programs couldn't do much,

    but it is a real chin scratcher. Now, that code could have been suggested in goto form...but it was not.

    Coincidence?

     

    I read an interesting "web opinion" page in the mid-2000s that was titled something like "Real-Time Programming",

    that really said some stuff that made sense. The person was arguing that code should have more system time checks

    in it, instead of just relying on processor speed.

     

    You know, stuff like:

    //==============================timer loop (start)

    delay = 10; //seconds

    TIME = DateTime.Now.TimeofDay;

    if (WAIT < TIME + delay) then <loop>;

    //==============================timer loop (end)

     

    In this way, the program always will take 10 seconds to do whatever, even with hardware upgrades.

     

  9. Yeah, MS-DOS BATCH can use variables for its goto statement, unfortunately, my brain shuts

    down whenever I get to making a batch with variables with "% %" around them. I always thought

    the BASIC $tring variable was pretty lame tho.

     

    I might also offer up for argument the fact that: For-Next Should Have Been Considered Dangerous...

    as its used to replace goto loops a lot.

     

    Back in the day when things like (QBasic's) gosub and for-next and do while loops were being introduced to

    the "general public" through their new home computers (early 1980s), people were taught to use

    FOR-NEXT loops as time delays.

     

    The idea was that (due to the speed of the processor), counting so many times using FOR-NEXT

    would equal so many seconds. The problem was that as processors got faster, the length of time the

    programmer's FOR-NEXT loop took grew to nothing, and thus parts of their programs became no longer

    functional without a CPU emulation program.

     

    Oh well, I guess I'll never get to play that "Hong Kong Hustle" type-in game...

  10. The classic answer is that GOTO has no WHEREFROM

    Yeah, that would be a good one to add to Goto.

     

    Also, how about GOTO <variable>...

    as in:

    A = X:\User\Program\Pallete Engine\RGB Engine LINE-041

    B = ?

     

    GOTO A?

     

     

    ....ahhhhh, that's it for me on this topic bros. looks like you guys win again. true pain here.  :bmw:  :lightning:  :scanner:  :foaf:  :user-silhouette:  :currency-dollar-usd:

  11. Yeah, personally I wish goto was stronger and could include going to a separate text file

    and position in that file.

     if (g=100) {goto code-base01.txt line-021;}

    ...probably needs some other upgrades too.

     

    I hate having to put all code in one document, that's WAY too old-school for me. Here's

    the Kevin Flynn way:

    if (g=100) {goto LINE-35013}

     

    :game:...that's some funny stuff... :game:

      :game: :game: :game: :game: :game: :game: :game: :game: :game: :game: :game:

       :game: :game: :game: :game: :game: :game: :game: :game: :game: :game:

          :game: :game: :game: :game: :game: :game: :game: :game: :game:

            :game: :game: :game: :game: :game: :game: :game: :game:

              :game: :game: :game: :game: :game: :game:

                :game: :game: :game: :game: :game:

                  :game: :game: :game: :game:

                     :game: :game: :game: #

                     :game: :game:    #

                       :game:      #

                                 #

                                 :demon:

  12. Hey!

     

    I'm busy learning C# and it's pretty cool. I've programmed plugins in XLISP, so learning C# hasn't been too bad. I just learn as I go.

     

    Anyway, why all the hate on using Goto to make loops?

     

    I mean, wasn't Dijkstra really saying that the programmers in the 1960s were so awful that they needed to use FOR-NEXT loops or they'd mess it all up?

     

    I mean, I'm definitely for assemblers that won't make (or test) code that will lock up a machine, but I don't think forcing people to not use Goto to make their own loops and code jumps is the answer.

     

    What's your opinion?

     

    http://www.codeproject.com/Articles/36899/Why-goto-Still-Exists-in-C

    http://stackoverflow.com/questions/6545720/does-anyone-still-use-goto-in-c-sharp-and-if-so-why

  13. Thanks for the helpful reply!

     

    I wish UI's could be more like real electronics, tho I haven't been too happy with the audio program VST

    "realism" look in particular...but it's probably mostly how the controls behave to mouse control. Turning VST knobs

    is difficult with a mouse.

     

    I was thinking about it today and (I think) a drop-down list is supposed to be like a knob control. You know,

    the knob is "inside" the device and each "turn" reveals an option.

     

    Judging from the example code, I suppose multi-radio buttons can only have one choice...You know, IF 1 & 2 are selected...

    then do something.

     

    So I'll probably go with three check boxes (which I think is supposed to be like switches) for my plugin.

     

    Thanks again.

  14. Yeah, there would have to be a standardization of graphics cards and monitors so that (at least without monitor/card adjustment) all colors in a distributed palette appear the same on all devices. This would ensure that the artists' conceptualization is delivered in the way intended by the artist, and not changed by the electronics.

     

    Somewhat off topic:

    Wouldn't it be funny if you had to purchase color for paint.net? So, if you messed up on something (just like real life), you'd have to purchase more color to continue your project? Just being silly on that one.

    :noes:

  15. That doesn't really make a whole lot of sense.  Despite the name, Paint.NET doesn't actually use any paint.  :-)  It's actually working with light, so for it to be as accurate as it can be, it needs to work with the light color model.

     

    Also, that's the standard for all graphics editing programs (except those that deal with print primarily).  It would be weird to give PdN something different from the industry standard.

     

    Yeah, it is all true and I really doubt paint.net (nor any other digital graphics program) would be able to change from a light color model to a plant/pigment-based color model.

     

    Yet, as someone who has always wanted to be better at mixing paint, it sure would be cool and I look forward to a new computing system and programs.

     

    Also, if done right, I think it would really increase graphics creativity AND help people to be better artists in the real world...for example: these new buildings that are going up everywhere will all need custom artwork (you know), and so will everyone's house(s).

     

  16. Thanks so much!

     

    Is it okay to use CodeLab to build the dll?

     

    From the looks of your code, I'm guessing that

       dst.CopySurface(src,rect.Location,rect);
    ...forces it to be single-threaded? Or is it closing the StreamWriter after all pixels are processed? Just wondering.

     

    My C# knowledge isn't very great (and I just want to use it for paint.net plugins anyway), so stuff like "string OutputFile = @..." is awesome.

     

    Thanks Again,

    P.

  17. I know this topic is old, but I used it for making my own plugin as I'm not too handy with c# and wasn't aware that codelab  could use this code. Thanks!

     

    Oh yeah, I think codelab's debugger runs the code constantly (like a spreadsheet), so maybe that was the access error? Works fine with an IF statement tho.

           int CPR = CPIX.R;
           if (CPR == 100)              { //START: CPR IF
             System.IO.StreamWriter SW;
             SW = System.IO.File.AppendText("C:\\Users\\CTCPublic\\Desktop\\geb\\CoolEdit.txt");
             SW.WriteLine("R:" + CPR + "," + "G:" + CPG + "," + "B:" + CPB + " |" +
                          "H:" + CPH + "," + "S:" + CPS + "," + "V:" + CPV + " |" + 
                          "coords=" + "V:" + V + "H:" + H);
            SW.Close();
                                        } //END: CPR IF
    
  18. Hello,

     

    I'm having problem with a plugin I'm writing (or at least part of the plugin).

     

    What this code does is:

    01. Looks for a pixel with a red value of 100

    02. Writes to a log file the RGB | HSV | Pixel Coordinates

     

    That's about it. It works great (thanks to paul_Nicholls for his post "Append to text file from inside CodeLab code"),

    but the problem is that the log is getting double entries for pixels (averaging 2 entries per pixel).

     

    I tested it by:

    01. Using a pencil set to R:100.

    02. Making one pixel dot onto to standard/default white.

    03. Selecting an area.

    04. Running the plugin.

     

    Nine times out of ten the log file shows 2 entries for the one pixel. This is also true even when only the red pixel

    is selected.

     

    Just wondering if anything can be done to fix this problem. Perhaps paint.net uses overlapping ROI rectangles?

     

    I've attached the source code only as you'll want to change the name and location of the log file if you'd like to test

    it out on your machines.

     

    Any help would be appreciated.

     

    -Paul

    // Name:
    
    // Submenu:
    // Author:
    
    // Title:
    
    // Desc:
    
    // Keywords:
    
    // URL:
    
    // Help:
    
    #region UICode
    
    int Amount1=0;	//[0,100]Slider 1 Description
    
    int Amount2=0;	//[0,100]Slider 2 Description
    
    int Amount3=0;	//[0,100]Slider 3 Description
    
    #endregion
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    void Render(Surface dst, Surface src, Rectangle rect)  {
     //START: RENDER CODE
    
         int TOP = rect.Top;
         int BOT = rect.Bottom;
         int LFT = rect.Left;
         int RIT = rect.Right;
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         for (int V=TOP; V < BOT; V++)        { //START: VERTICAL: TOP TO BOTTOM LOOP (Y)
             for (int H=LFT; H < RIT; H++)    { //START: HORIZONTAL: LEFT TO RIGHT LOOP (X)
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 ColorBgra CPIX = src[H,V];
    
    
                 Color STDC = CPIX.ToColor();
                 HsvColor CPHSV = HsvColor.FromColor(STDC);
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 int CPR = CPIX.R;
                 int CPG = CPIX.G;
                 int CPB = CPIX.B;
                 int CPH = CPHSV.Hue;
                 int CPS = CPHSV.Saturation;
                 int CPV = CPHSV.Value;
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 
    if (CPR == 100)                           {
     //START: CPR IF
                     System.IO.StreamWriter SW;
                     SW = System.IO.File.AppendText("C:\\Users\\CTCPublic\\Desktop\\geb\\CoolEdit.txt");
                     
                     
                     SW.WriteLine("R:" + CPR + "," + "G:" + CPG + "," + "B:" + CPB + " |" +
                                  "H:" + CPH + "," + "S:" + CPS + "," + "V:" + CPV + " |" + 
                                  "coords=" + "V:" + V + "H:" + H);
     
                     SW.Close();
                                                           } //END: CPR IF
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 dst[H,V] = CPIX;
    
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                           } //END: LEFT TO RIGHT LOOP
      
                                                         } //END: TOP TO BOTTOM LOOP
    
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                           } //END: RENDER CODE
    

    write-tex03.txt

  19. Yeah! This is EXACTLY the type of discussion that is great for our graphics programs.

     

    I'd like to see this extend to televisions, where movies are released with their own customized

    palettes (hopefully based on paint colours available on the commercial market).

     

    You know, the BEST place to start with base paints is what is most available (most used) in the agricultural

    market (ie, the plants used for your palette). For example, some might have a base blue color made

    from a crop of Woad plant grown in Israel, others might not.

     

    I'm sure with non-standardized graphics cards and monitors, it makes all this very difficult.

    I just think it would be cooler if graphics color was done more like painters, and less like

    light theorists.

     

    en.wikipedia.org/wiki/Tints_and_shades

     

    Thanks for the input!

  20. I've been trying to "recreate" a skin for AllMyNotes by changing the colors.

     

    The original skin font is shades of gray. I want to change them to green.

     

    Due to anti-aliasing, this ends up being many shades of gray which I

    will make many shades of green (hopefully looking as good as the original

    but green instead of gray).

     

    That said, I tried using HSV...as with the gray colors, mostly just the V changes.

    With green, I tried to compute how much S would be equivalent.

    That is: Making Gray Lighter = More V

                 Making Green Lighter = Less S

     

    I've even "read up" on HSV color system some. Very mathematical.

     

    Didn't really work too well, so now I'll just "eye" the colors.

     

    Which made me wonder why this system is used in the first place. In

    "real life", if one wants a lighter shade of a color, doesn't one usually add white?

    To make darker, add black?

     

    Isn't this is the way painters have done for centuries?

    Yet this is NOT done in any graphx program (such as Paint.net).

    Why?

     

    You know, if computer color systems were done more like real world painters do it,

    then perhaps people could learn how to mix colors in the "real world" as

    they were using the programs to make things for computers. (Just a Thought).

     

    Also, why is the color palette so small? I'll just stick with a pdn file and the color

    picker.

     

  21. Wow, I didn't know you guys liked the XY so much that you would denigrate someone like that.

     

    Not cool!

     

    But to get back on topic (since you guys derailed it pretty bad for admins)....

     

    I think the whole 2D array for XY/HV is bad. Some people like counting up, then over (VH) and

    this could easily be fixed by using single variables. I prefer HV (most of the time).

    ....

    So fix it already. What's your problem homebrew?

  22. I think the X/Y thing is a left over from that whole NASA-50s-United Nations "one world" thing.

     

    You know, one advantage it has is it's "readable" by all languages. I think most languages

    have an "x" and a "y" in the language, and thus the meaninglessness of the variable names

    is important (Vertical and Horizontal are probably different in most languages) as when they

    all get together they can point at it and say "the X trajectory of  the nuclear warhead makes

    me sad."...and EVERYONE in the room will know what he/she is talking about.

     

    Still, I like variables that make sense.

     

    Strange that X/Y hasn't changed with OOP languages currently prevailing. You know, most

    OOP programmers like very verbose variables like:

    number_of_cupcakes = 500

    Mine would be NOC = 500

     

    Like that "UP" idea for movement from points tho. H/V = [10,1] UP 5 = [10,6] DN 5 = [10/1]

    ...good stuff! THX!

     

    PS: Somehow using variables in MS-DOS BATCH now seems more reliable to me...

    %PEACE% + %OUT%

×
×
  • Create New...