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

Summary: RadialGradient wrongly centered
Product: .NET TeeChart Reporter: narcís calvet <narcis>
Component: AndroidAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: narcis
Priority: Normal    
Version: TeeChart.NET 2014 4.1.2014.02060   
Target Milestone: ---   
Hardware: Phone   
OS: Android   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

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.