Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Tizen] Support Brushes to Tizen #12501

Merged
merged 1 commit into from
Oct 19, 2020
Merged

Conversation

rookiejava
Copy link
Collaborator

@rookiejava rookiejava commented Oct 16, 2020

Description of Change

This PR adds Brushes (#9220) Tizen implementation.

This change also allows the user to choose whether to use the SkiaSharp-based renderer via the init option. Comparing the existing renderers, SkiaSharp-based renderer will bring huge functional advantages including Shapes, Brush, BorderElement and enhancing limited features which has been existed on default renderers.

To enable the SkiaSharp-based renderers, use Forms.Init() as shown below. (The default is false.)

var option = new InitializationOptions(app) { UseSkiaSharp = true }; 
Forms.Init(option);

Currently available SkiaSharp-based renderers are as follows.

  • LayoutRenderer (StackLayout, AbsoluteLayout, Grid, ...)
  • PageRenderer (ContentPage)
  • FrameRenderer
  • BoxViewRenderer
  • ImageRenderer

Issues Resolved

API Changes

namespace Xamarin.Forms
Added:

  • bool InitializationOptions.UseSkiaSharp {get; set;}
  • bool Forms.UseSkiaSharp {get;}

namespace Xamarin.Forms.Platform.Tizen
Added:

  • class BrushExtensions
  • SKCanvasView LayoutRenderer.BackgroundCanvas {get;}
  • void LayoutRenderer.OnBackgroundPaint()
  • void LayoutRenderer.OnBackgroundLayoutUpdated()
  • SKCanvasView PageRenderer.BackgroundCanvas {get;}

namespace Xamarin.Forms.Platform.Tizen.SkiaSharp
Added:

  • interface IBackgroundCanvas
  • abstract class CanvasViewRenderer
  • class BoxViewRenderer
  • class FrameRenderer
  • class ImageRenderer

Platforms Affected

  • Tizen

Behavioral/Visual Changes

None

Before/After Screenshots

  • StackLayout

  • ContentPage

  • BoxView

  • Frame

  • Image

Testing Procedure

Launch Core Gallery and navigate to the new Gradients Gallery.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@rmarinho rmarinho merged commit b349dd2 into xamarin:5.0.0 Oct 19, 2020
@samhouts samhouts added this to the 5.0.0 milestone Nov 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] GradientBrush not working in Tizen
4 participants