This function can be used to enable the use of alpha channel values for rain rate colors set by fsMapViewSetWeatherRadarRainColors. Applies to weather radar maps in the horizontal (FS_MAP_VIEW_WEATHER_RADAR_MODE_HORIZONTAL) and vertical (FS_MAP_VIEW_WEATHER_RADAR_MODE_VERTICAL) mode. By default, this is disabled and alpha values are ignored (set to 1). For alpha blending information, see Remarks.

Syntax
bool fsMapViewSetWeatherRadarColorAlphaEnabled(
    FsContext ctx,
    FsTextureId id,
    bool bEnabled
);
Members
ParametersDescription
ctxA value of type FsContext provided as an argument of the gauge callback.
idThe MapView render ID as returned by the function fsMapViewCreate.
bEnabledWhether the alpha channel should be enabled or not.
Return Values

Returns false if:

  • no texture matches the given MapView ID
  • the ctx is invalid

Otherwise it will return true.

Remarks

In order to get correct alpha blending (for rain rate colors with alpha values different than 0 and 1), the map view must be created with the FS_RENDER_IMAGE_PREMULTIPLIED image flag.

0/255