VID: delete area?

Discussion in 'Rebol' started by ddalley, Sep 8, 2010.

  1. ddalley

    ddalley New Member

    Looking through the View guide, I don't see how to clear an area.

    I want to cut a rectangle out of a Rebol created gradient, not fill it with anything, so that it doesn't affect neighbouring pixels. In other words, I want to create a rectangular doughnut.

    When I filled with white (snow), it changed the row of pixels at the bottom edge.
  2. Graham

    Graham Developer Staff Member

    You want to show us the code? Are you talking about clearing a rectangle in an image?
  3. ddalley

    ddalley New Member

    Yes, clearing an area in an image.

    I'm sure the same procedure could be used to chop up an image and save all of the parts, which could also be useful.
  4. Graham

    Graham Developer Staff Member

  5. ddalley

    ddalley New Member

    You changed the colour to white, right?

    That means the area is still there.
  6. MaxV

    MaxV Member

    Look at these examples:
    Code:
    view layout [ box 250x250 effect [ draw [
        image logo.gif 120x1 254.254.254 border
        ]]]
    
    Code:
    view layout [ box 250x250 effect [ draw [
           pen yellow red line-width 5 line-pattern 5 5
           image logo.gif 1x100 border
            ]]]
    
    Code:
    view layout [ box 300x300 effect [ draw [
                pen yellow red  line-width 20  box 50x50 250x250
                pen logo.gif  line-width 10  box 20x20  80x80
                ]]]
    
    The last one is what you want, I suppose...

Share This Page