Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Req paint help with transparency

Featured Replies

If anybody knows the command/method used to alter the transparency of a fillRect() for paint that would be great. I tried looking it up and saw that it might be called alpha to alter this, however I can't figure out how to change alpha. The only command i can see is getAlpha(). If anyone could provide me with an example that would be great. I'm sure I can figure it out from there!

Thanks in advance!

Use a transparent color.

Color has multiple constructors. The one that takes 4 int arguments is the one you want. The last argument is the "alpha":

Color color = new Color(255, 0, 0, 100);

void onPaint(Graphics2D g) {
    g.setColor(color);
    g.fillRect(...);
}

Edited by fixthissite

 

Use a transparent color.

Color has multiple constructors. The one that takes 4 int arguments is the one you want. The last argument is the "alpha":

Color color = new Color(255, 0, 0, 100);

void onPaint(Graphics2D g) {
    g.setColor(color);
    g.fillRect(...);
}

 

This^

 

It is worth noting that, like the RGB values, the alpha constructor is also in the range 0-255 where 255 is solid colour.

 

apa

  • Author

Ahh just realized it was you again FixThisSite! I'll post a screen of proggy tomorrow morning :D

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.