IMapBackground.GradientAngle

Fore Syntax

GradientAngle: Double;

Fore.NET Syntax

GradientAngle: double;

Description

The GradientAngle property determines legend background gradient angle.

Comments

This property is relevant if:

Fore Example

Executing the example requires that the repository contains a form containing the components:

It is also required to have a regular report containing a map with enabled legend that is a data source for UiReport1.

Add links to the Drawing, Map, Report, Tab system assemblies.

Sub UserProc;
Var
    regrep: IPrxReport;
    sheet: IPrxSheet;
    table: IPrxTable;
    objects: ITabObjects;
    map: IMap;
    legend: IMapLegend;
    background: IMapBackground;
Begin
    // Get regular report
    regrep := UiReport1.Report;
    // Get map from regular report
    sheet := regrep.Activesheet;
    table := sheet As IPrxTable;
    objects := table.TabSheet.Objects;
    map := objects.Item(0).Extension As IMap;
    // Get map legend
    legend := map.View.Legend;
    // Get legend background on map
    background := legend.Background;
    // Set legend gradient fill type
    background.Type := MapBackgroundType.Gradient;
    // Set gradient color
    background.GradientColor := New GxColor.CreateRGB(1200120);
    // Set gradient angle
    background.GradientAngle := 45;
    // Refresh map
    map.Refresh;
End Sub UserProc;

After executing the example legend background fill becomes gradient, gradient angle becomes equal to 45°.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Map;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Public
 Sub UserProc();
Var
    regrep: IPrxReport;
    sheet: IPrxSheet;
    table: IPrxTable;
    objects: ITabObjects;
    map: IMap;
    legend: IMapLegend;
    background: IMapBackground;
    Color: GxColorClass_2 = New GxColorClass_2();
Begin
    // Get regular report
    regrep := UiReportNet1.ReportUi.Report;
    // Get map from regular report
    sheet := regrep.Activesheet;
    table := sheet As IPrxTable;
    objects := table.TabSheet.Objects;
    map := objects.Item[0].Extension As IMap;
    // Get map legend
    legend := map.View.Legend;
    // Get legend background on map
    background := legend.Background;
    // Set legend gradient fill type
    background.Type := MapBackgroundType.mbtGradient;
    // Set gradient color
    Color.CreateRGB(1200120);
    background.GradientColor := Color;
    // Set gradient angle
    background.GradientAngle := 45;
    // Refresh map
    map.Refresh();
End Sub UserProc;

See also:

IMapBackground