Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

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.

Writing "Strings" in C

Featured Replies

One way to dim the display is to render the same exact image in GDI+, but using a color transform to brighten or darken the image.The easiest way to do this in GDI+ is to use a color transformation matrix.Example:Graphics* pgCanvas = NULL; // graphics contextbmpImage = new Bitmap(width, height); // render in memorypgCanvas = Graphics::FromImage(bmpImage); // the drawing contextfloat rscale, bscale, gscale;GetColorScale(&rscale,&bscale,&gscale); // current color scale factor (a routine you write)ImageAttributes m_imAtt;ColorMatrix colorMatrix = { rscale, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, gscale, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, bscale, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}; m_imAtt.SetColorMatrix(&colorMatrix,ColorMatrixFlagsDefault,ColorAdjustTypeBitmap); pgCanvas->DrawImage(bmpImage,rect,0,0,width,height,UnitPixel,&m_imAtt);Hope this helps,Etienne

You can also scale the alpha in the same transform matrix (row 4, col 4).Problem is, this scales in rgb-space, which can cause undesirable color shifts. To properly dim a color (other than white/gray), it should be converted to HSB or HLS color-space, where you can scale a single value (Brightness or Luminence) and convert back to rgb.Douglas

Create an account or sign in to comment

Account

Navigation

Search

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.