Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Image editor

jonybasicjonybasic Posts: 21Member
I am working on an image editor with a few functions like line, circle,
square and flood fill, the flood fill is an enigma to me.
Can anyone give me an algorithm or idea to help me?
you help is most apreciated



Comments

  • IDKIDK Posts: 1,784Member
    : I am working on an image editor with a few functions like line, circle,
    : square and flood fill, the flood fill is an enigma to me.
    : Can anyone give me an algorithm or idea to help me?
    : you help is most apreciated
    :
    :
    :
    :
    I got an idea on this a couple of years ago.

    If you start at some position (where the user clicks)
    Then use this psuedo func:
    [code]
    func (x, y)
    if thisPos is the color of the startPos then
    make a func on all neighbors of thisPos
    end function
    [/code]

    If you don't get it just asc. I don't know if it works becouse I havn't tested it.

    [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

  • DrMartenDrMarten Posts: 748Member
    : I am working on an image editor with a few functions like line, circle,
    : square and flood fill, the flood fill is an enigma to me.
    : Can anyone give me an algorithm or idea to help me?
    : you help is most apreciated
    :
    :
    :
    :
    ----------------------------

    I know other routines to do ellipses, stars, cones, ellipse shaped stars, regular polygons and polygons within ellipses, spirals in circles aa well an within ellipses if you are interested?

    If so, just let me know.

    All you need to know is the PLOT function or PSET or whatever it is on your version of BASIC

    Regards,

    DrMarten

  • IDKIDK Posts: 1,784Member
    : : I am working on an image editor with a few functions like line, circle,
    : : square and flood fill, the flood fill is an enigma to me.
    : : Can anyone give me an algorithm or idea to help me?
    : : you help is most apreciated
    : :
    : :
    : :
    : :
    : ----------------------------
    :
    : I know other routines to do ellipses, stars, cones, ellipse shaped stars, regular polygons and polygons within ellipses, spirals in circles aa well an within ellipses if you are interested?
    :
    : If so, just let me know.
    :
    : All you need to know is the PLOT function or PSET or whatever it is on your version of BASIC
    :
    : Regards,
    :
    : DrMarten
    :
    :
    I could use some of those funcs...

    I did a program that displayed circles with the Poke, that's the fastes way of doing it, but I couldn't get the how to make a line...

    [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

  • CyGuyCyGuy Posts: 312Member
    : : : I am working on an image editor with a few functions like line, circle,
    : : : square and flood fill, the flood fill is an enigma to me.
    : : : Can anyone give me an algorithm or idea to help me?
    : : : you help is most apreciated
    : : :
    : : :
    : : :
    : : :
    : : ----------------------------
    : :
    : : I know other routines to do ellipses, stars, cones, ellipse shaped stars, regular polygons and polygons within ellipses, spirals in circles aa well an within ellipses if you are interested?
    : :
    : : If so, just let me know.
    : :
    : : All you need to know is the PLOT function or PSET or whatever it is on your version of BASIC
    : :
    : : Regards,
    : :
    : : DrMarten
    : :
    : :
    : I could use some of those funcs...
    :
    : I did a program that displayed circles with the Poke, that's the fastes way of doing it, but I couldn't get the how to make a line...
    :
    : [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]
    :
    :
    i will soon be coding in 32 bits, and when i upgrade the old clock program, i will get you some function upgrade, thanks for help guys
    Russ
Sign In or Register to comment.