Class SfImageEditor
Represents ImageEditor class
Inheritance
Namespace: Syncfusion.SfImageEditor.iOS
Assembly: Syncfusion.SfImageEditor.iOS.dll
Syntax
public class SfImageEditor : UIView
Constructors
SfImageEditor()
Initializes a new instance of the SfImageEditor class.
Declaration
public SfImageEditor()
SfImageEditor(CGRect)
Initializes a new instance of the SfImageEditor class.
Declaration
public SfImageEditor(CGRect frame)
Parameters
Type | Name | Description |
---|---|---|
CoreGraphics.CGRect | frame |
SfImageEditor(IntPtr)
Declaration
public SfImageEditor(IntPtr handle)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | handle |
Properties
ActualImageRenderedBounds
Declaration
public Rectangle ActualImageRenderedBounds { get; }
Property Value
Type |
---|
System.Drawing.Rectangle |
ColorPalette
Gets or Sets the ColorPalette collection for toolbar.
Declaration
public ObservableCollection<UIColor> ColorPalette { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<UIKit.UIColor> |
DefaultSelectedColorIndex
Gets or sets the ColorPalette selected Index value
Declaration
public int DefaultSelectedColorIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
EffectValue
Gets or sets the value to apply the image effects.
Declaration
public float EffectValue { get; set; }
Property Value
Type |
---|
System.Single |
EnableAutoSelectText
Gets or sets the selection of edit text is enabled or not.
Declaration
public bool EnableAutoSelectText { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableZooming
Gets or Sets value to enable the zooming.
Declaration
public bool EnableZooming { get; set; }
Property Value
Type |
---|
System.Boolean |
Frame
Gets or Sets frame value
Declaration
public override CGRect Frame { get; set; }
Property Value
Type |
---|
CoreGraphics.CGRect |
Image
Gets or Sets the Image for the ImageEditor
Declaration
public UIImage Image { get; set; }
Property Value
Type |
---|
UIKit.UIImage |
ImageEffect
Gets or sets the effect of the image.
Declaration
public ImageEffect ImageEffect { get; set; }
Property Value
Type |
---|
ImageEffect |
IsImageEdited
Get the value to indicate the Image is edited or not.
Declaration
public bool IsImageEdited { get; }
Property Value
Type |
---|
System.Boolean |
IsImageZoomed
Gets a value that indicates whether editor image is zoomed or not. It is a read-only property.
Declaration
public bool IsImageZoomed { get; }
Property Value
Type |
---|
System.Boolean |
IsSelected
Gets a value indicating whether any shape or text is selected.
Declaration
public bool IsSelected { get; }
Property Value
Type |
---|
System.Boolean |
MaximumZoomLevel
Gets or Sets the maximum zoom level.
Declaration
public nfloat MaximumZoomLevel { get; set; }
Property Value
Type |
---|
System.nfloat |
OriginalImageSize
Declaration
public Size OriginalImageSize { get; }
Property Value
Type |
---|
System.Drawing.Size |
PanningMode
Gets or sets the PanningMode to zoom the image in single or two finger.
Declaration
public PanningMode PanningMode { get; set; }
Property Value
Type |
---|
PanningMode |
RotatableElements
Gets or sets rotatable elements in the editor
Declaration
public ImageEditorElements RotatableElements { get; set; }
Property Value
Type |
---|
ImageEditorElements |
ToolBarSettings
Gets or Sets ToolBarSettings value
Declaration
public ToolbarSettings ToolBarSettings { get; set; }
Property Value
Type |
---|
ToolbarSettings |
ZoomLevel
Gets or sets the zoom level of the editor image.
Declaration
public double ZoomLevel { get; set; }
Property Value
Type |
---|
System.Double |
Methods
add_BeginReset(BeginResetEventHandler)
Declaration
public void add_BeginReset(BeginResetEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
BeginResetEventHandler | value |
add_EndReset(EndResetEventHandler)
Declaration
public void add_EndReset(EndResetEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
EndResetEventHandler | value |
add_ImageLoaded(ImageLoadedEventHandler)
Declaration
public void add_ImageLoaded(ImageLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageLoadedEventHandler | value |
add_ImageSaved(ImageSavedEventHandler)
Declaration
public void add_ImageSaved(ImageSavedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageSavedEventHandler | value |
add_ImageSaving(ImageSavingEventHandler)
Declaration
public void add_ImageSaving(ImageSavingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageSavingEventHandler | value |
add_ItemSelected(ItemSelectedEventHandler)
Declaration
public void add_ItemSelected(ItemSelectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ItemSelectedEventHandler | value |
add_ItemUnselected(ItemUnselectedEventHandler)
Declaration
public void add_ItemUnselected(ItemUnselectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ItemUnselectedEventHandler | value |
AddCustomView(UIView, CustomViewSettings)
Declaration
public void AddCustomView(UIView view, CustomViewSettings customViewSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UIKit.UIView | view | |
CustomViewSettings | customViewSettings |
AddShape(ShapeType, PenSettings)
Addshape method
Declaration
public void AddShape(ShapeType shapeType, PenSettings penSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ShapeType | shapeType | ShapeType |
PenSettings | penSettings | Pensettings |
AddText(String, TextSettings)
Addtext method
Declaration
public void AddText(string text = "Enter Text", TextSettings textSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text |
TextSettings | textSettings | Textsettings |
ApplyImageEffect(ImageEffect, Single)
ApplyImageFilters method is used to apply the image effects without using Toolbar
Declaration
public void ApplyImageEffect(ImageEffect effect, float amount)
Parameters
Type | Name | Description |
---|---|---|
ImageEffect | effect | |
System.Single | amount | float |
AwakeFromNib()
Declaration
public override void AwakeFromNib()
BringForward()
BringForward method
Declaration
public void BringForward()
BringToFront()
BringToFront method
Declaration
public void BringToFront()
ClearAnnotations()
Clear the shapes/text added on the image.
Declaration
public void ClearAnnotations()
Crop(Rectangle, Boolean)
/// Crops the image based on the specified bounds.
Declaration
public void Crop(Rectangle rect = null, bool isEllipse = false)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle | rect | Bounds to crop the image.(Optional). |
System.Boolean | isEllipse | True to crop in elliptical shape, false otherwise.(Optional). |
Delete()
Declaration
public void Delete()
Flip(FlipDirection)
Method to perform flip functionality
Declaration
public void Flip(FlipDirection direction)
Parameters
Type | Name | Description |
---|---|---|
FlipDirection | direction | Direction |
GetStream()
Declaration
public Task<Stream> GetStream()
Returns
Type |
---|
System.Threading.Tasks.Task<System.IO.Stream> |
LoadEdits(Stream)
Declaration
public void LoadEdits(Stream jsonStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | jsonStream |
Redo()
Declaration
public void Redo()
remove_BeginReset(BeginResetEventHandler)
Declaration
public void remove_BeginReset(BeginResetEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
BeginResetEventHandler | value |
remove_EndReset(EndResetEventHandler)
Declaration
public void remove_EndReset(EndResetEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
EndResetEventHandler | value |
remove_ImageLoaded(ImageLoadedEventHandler)
Declaration
public void remove_ImageLoaded(ImageLoadedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageLoadedEventHandler | value |
remove_ImageSaved(ImageSavedEventHandler)
Declaration
public void remove_ImageSaved(ImageSavedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageSavedEventHandler | value |
remove_ImageSaving(ImageSavingEventHandler)
Declaration
public void remove_ImageSaving(ImageSavingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ImageSavingEventHandler | value |
remove_ItemSelected(ItemSelectedEventHandler)
Declaration
public void remove_ItemSelected(ItemSelectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ItemSelectedEventHandler | value |
remove_ItemUnselected(ItemUnselectedEventHandler)
Declaration
public void remove_ItemUnselected(ItemUnselectedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ItemUnselectedEventHandler | value |
Reset()
Declaration
public void Reset()
Rotate()
Declaration
public void Rotate()
Save(String, CGSize)
save method
Declaration
public void Save(string format = null, CGSize size = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | format | |
CoreGraphics.CGSize | size |
SaveEdits()
Declaration
public Stream SaveEdits()
Returns
Type |
---|
System.IO.Stream |
SelectShape(Int32)
To select the annotation added on image programatically using its unique ID.
Declaration
public void SelectShape(int ID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ID | The unique ID. |
SendBackward()
SendBackward method
Declaration
public void SendBackward()
SendToBack()
SendToBack method
Declaration
public void SendToBack()
SetToolbarItemVisibility(String, Boolean)
To visible or hide the toolbar items
Declaration
public void SetToolbarItemVisibility(string name, bool isVisible)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The parameter contains the toolbar item name |
System.Boolean | isVisible | The parameter to check the toolbar item visible or not |
Tilt(Double)
To rotate the image from -45 to 45 degree in preview state. To crop the preview rotation, call Crop() method of SfImageEditor.
Declaration
public void Tilt(double angle)
Parameters
Type | Name | Description |
---|---|---|
System.Double | angle | Angle to which image has to be tilted. It must range from -45 to +45 degrees. |
ToggleCropping()
Declaration
public void ToggleCropping()
ToggleCropping(Boolean, Int32)
Enables the cropping preview sub toolbar items. Specify selectedIndex value to customize default selection of cropping preview toolbar item.
Declaration
public void ToggleCropping(bool showToolbarItems, int selectedIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | showToolbarItems | Enable or disable cropping preview toolbar items. |
System.Int32 | selectedIndex | Change the default cropping selection preview toolbar item. |
ToggleCropping(RectangleF)
Declaration
public void ToggleCropping(RectangleF rect)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rect |
ToggleCropping(RectangleF, Boolean)
Enables the cropping preview on the image with the specified rectangle bounds. Specify isEllipse as true to crop in elliptical shape.the cropping preview on the image with the specified rectangle bounds. Specify isEllipse as true to crop in elliptical shape.
Declaration
public void ToggleCropping(RectangleF rect, bool isEllipse)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rect | Bounds of the cropping preview on the image. |
System.Boolean | isEllipse | True to crop in elliptical shape, false otherwise. |
ToggleCropping(Single, Single, Boolean)
Enables a cropping preview on the image with the specified ratio.
Declaration
public void ToggleCropping(float arg1, float arg2, bool isEllipse = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | arg1 | x ratio. |
System.Single | arg2 | y ratio. |
System.Boolean | isEllipse | Shape of the cropping, either in elliptical or rectangular format. |
Undo()
Declaration
public void Undo()
Events
BeginReset
Declaration
public event BeginResetEventHandler BeginReset
Event Type
EndReset
Declaration
public event EndResetEventHandler EndReset
Event Type
Type |
---|
EndResetEventHandler |
ImageEdited
The event raised when the Image is Edited
Declaration
public event EventHandler<ImageEditedEventArgs> ImageEdited
Event Type
Type |
---|
System.EventHandler<ImageEditedEventArgs> |
ImageLoaded
Declaration
public event ImageLoadedEventHandler ImageLoaded
Event Type
ImageSaved
Declaration
public event ImageSavedEventHandler ImageSaved
Event Type
ImageSaving
Declaration
public event ImageSavingEventHandler ImageSaving
Event Type
ItemSelected
Declaration
public event ItemSelectedEventHandler ItemSelected
Event Type
ItemUnselected
ItemUnselected event
Declaration
public event ItemUnselectedEventHandler ItemUnselected