Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 1021 - RadialGradient wrongly centered
Summary: RadialGradient wrongly centered
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Android (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.02060
Hardware: Phone Android
: Normal normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-26 05:12 EST by narcís calvet
Modified: 2014-11-26 05:45 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2014-11-26 05:12:18 EST
RadialGradient is centered at the left-top corner of the rectangle instead of the center. Code to reproduce:

void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
  g.Gradient.Visible = true;
  g.Gradient.Direction = Steema.TeeChart.Drawing.GradientDirection.Radial;
  g.Gradient.StartColor = Color.Red;
  g.Gradient.MiddleColor = Color.Yellow;
  g.Gradient.EndColor = Color.Blue;
  
  Display disp = GetDisplay();
  g.Rectangle(disp.Width / 4, disp.Height / 4, Steema.TeeChart.Utils.Round(disp.Width * 0.75), Steema.TeeChart.Utils.Round(disp.Height * 0.75));
}	  

private Display GetDisplay()
{
  return this.GetSystemService(Android.Content.Context.WindowService).JavaCast<Android.Views.IWindowManager>().DefaultDisplay;
}
Comment 1 narcís calvet 2014-11-26 05:28:10 EST
This happens both in Xamarin.Android and Android applications with Xamarin.Forms.