/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
namespace ElmSharp
{
///
/// The Rectangle is a class that used to draw a solid colored rectangle.
///
public class Rectangle : EvasObject
{
///
/// Creates and initializes a new instance of the Rectangle class.
///
/// The to which the new Slider will be attached as a child.
public Rectangle(EvasObject parent) : base(parent)
{
Interop.Evas.evas_object_size_hint_weight_set(Handle, 1.0, 1.0);
}
///
/// Creates a widget handle.
///
/// Parent EvasObject
/// Handle IntPtr
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr evas = Interop.Evas.evas_object_evas_get(parent.Handle);
return Interop.Evas.evas_object_rectangle_add(evas);
}
}
}