RealBasic

Discussion in 'Mac Apps and Mac App Store' started by Pedro Estarque, Mar 27, 2003.

  1. Pedro Estarque macrumors regular

    Joined:
    Dec 5, 2002
    #1
    I'm learning basic and just built my first app, :D I've developed a small GUI for a BSD shell script that uses lynx in OS X. Although very simple, is quite useful for authentication in Brazilian's broad band web site. The program works fine but the interface need's polishing.
    It must be a very stupid question but do you know how to apply masks to images in realbasic ? The only thing I can do is apply a white transparency (in the properties window), but that has no anti-aliasing and the result is very bad.
    Any help is appreciated
     
  2. benjaminpg macrumors regular

    Joined:
    Apr 21, 2002
    Location:
    Salt Lake City, UT
    #2
    Congratulations on building your first RB app. I'm guessing you are putting the image in a Canvas control. If not this is probably the way you want to do it.

    Within the canvas class is a Paint event with the parameters g as Graphics. You must draw the image to this graphics object. First you must create a picture object with your mask and image in it. Like this:

    dim p as Picture
    p = NewPictrue(width, height, depth)
    p.Mask = MyMaskName
    p.Graphics.DrawPicture(MyImageName, 0, 0)

    Then finally the picture must be drawn to the graphics object g.

    g.DrawPicture(p,xPosition,yPosition)

    I think that should do it, although I must confess I haven't done it before. You may want to join the RB mailing list, which is composed of extremely knowledgeable people, who are still willing to help just about anyone. You can subscribe at this address: http://www.realbasic.com/support/lists.html

    Depending on who the target of this app is, you may want to consider not using the image in the interface. Many users prefer to have a unified interface without company logos etc. If this is for an about box, though, it is perfectly acceptable. You may want to read apple's Aqua Human Interface Guidelines, available on apple's site, somewhere.
     
  3. Pedro Estarque thread starter macrumors regular

    Joined:
    Dec 5, 2002
  4. benjaminpg macrumors regular

    Joined:
    Apr 21, 2002
    Location:
    Salt Lake City, UT
  5. Pedro Estarque thread starter macrumors regular

    Joined:
    Dec 5, 2002
    #5
    benjaminpg, sorry to bother

    I don't know what I did wrong but RB asks for the value for the function mask. Any Ideas?
    Thanks again
     

    Attached Files:

    • bug.jpg
      bug.jpg
      File size:
      19 KB
      Views:
      253

Share This Page