Is it possible to add borders to bitmap objects?

Discussion in 'Learning Ruby and RGSSx' started by Faherya, Mar 16, 2018.

  1. Faherya

    Faherya The Knight of the Sad Figure Veteran

    Messages:
    201
    Likes Received:
    489
    Location:
    Brazil
    First Language:
    Português
    Primarily Uses:
    RMVXA
    Hello everyone, good afternoon. Let me see, this is the default battleback:
    Please ignore the graphics. It's just a test.
    [​IMG]
    As you can see, the image is well shifted on a black background. Is it possible to add some type of border in these maps? In this case, in the battleback image? Perhaps a single contour line could improve slightly visually. I'm trying to reproduce something similar to the Dragon Warrior's battle by just changing the positions of the windows on the RMVX Ace's standard battle system.
     
    #1
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,278
    Likes Received:
    4,796
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    I personally have border fill method on my basic module (as well as entire fill)
    Code:
    class Bitmap
     
      # Fill entire bitmap with color
      def entire_fill(color = Color.new(0,0,0,150))
        fill_rect(self.rect,color)
      end
     
      # Fill bitmap edge only
      def border_fill(color = Color.new(255,255,255))
        fill_rect(0,0,width,1,color)
        fill_rect(0,0,1,height,color)
        fill_rect(width-1,0,1,height,color)
        fill_rect(0,height-1,width,1,color)
      end
     
    end
    
     
    #2
    Faherya likes this.
  3. Faherya

    Faherya The Knight of the Sad Figure Veteran

    Messages:
    201
    Likes Received:
    489
    Location:
    Brazil
    First Language:
    Português
    Primarily Uses:
    RMVXA
    Flawless! Could I use this snippet of code?
     
    #3
  4. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,278
    Likes Received:
    4,796
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Of course!
     
    #4
    Faherya likes this.
  5. Faherya

    Faherya The Knight of the Sad Figure Veteran

    Messages:
    201
    Likes Received:
    489
    Location:
    Brazil
    First Language:
    Português
    Primarily Uses:
    RMVXA
    Thank you very much! Problem solved. :D
     
    #5

Share This Page