本文整理汇总了C#中UIImageView.SetNeedsDisplay方法的典型用法代码示例。如果您正苦于以下问题:C# UIImageView.SetNeedsDisplay方法的具体用法?C# UIImageView.SetNeedsDisplay怎么用?C# UIImageView.SetNeedsDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIImageView
的用法示例。
在下文中一共展示了UIImageView.SetNeedsDisplay方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad();
RootElement root = Root;
root.UnevenRows = true;
UIImageView imageView = new UIImageView(View.Frame);
//StringElement messageElement = new StringElement("");
Section imageSection = new Section() {imageView};
root.Add(new Section()
{ new StyledStringElement("Process", delegate {
using (Mat resized = DrawSubdivision.Draw(Math.Min( (int) View.Frame.Width, (int) View.Frame.Height) , 20))
//using (Image<Bgr, Byte> resized = result.Resize((int)View.Frame.Width, (int)View.Frame.Height, Emgu.CV.CvEnum.INTER.CV_INTER_NN, true))
{
imageView.Frame = new RectangleF(PointF.Empty, resized.Size);
imageView.Image = resized.ToUIImage();
}
//messageElement.Value = String.Format("Detection Time: {0} milliseconds.", processingTime);
//messageElement.GetImmediateRootElement().Reload(messageElement, UITableViewRowAnimation.Automatic);
imageView.SetNeedsDisplay();
this.ReloadData();
}
)});
//root.Add(new Section() {messageElement});
root.Add(imageSection);
}
示例2: DrawImageView
public override void DrawImageView (UIImageView view)
{
return;
if (userImage == null)
{
userImage = ImageStore.RequestFullPicture((long)_User.id, (long)_User.id, SizeDB.SizeFacebook, this);
userImage = userImage ?? ImageStore.EmptyProfileImage;
userImage = UIImageUtils.resizeImage(userImage, new SizeF (35, 35));
userImage = GraphicsII.RemoveSharpEdges(userImage);
if (userImage != null)
view.Image = userImage;
}
else
view.Image = userImage;
view.SetNeedsDisplay();
base.DrawImageView (view);
}
示例3: ViewDidLoad
public override void ViewDidLoad()
{
base.ViewDidLoad();
RootElement root = Root;
root.UnevenRows = true;
UIImageView imageView = new UIImageView(View.Frame);
StringElement messageElement = new StringElement("");
StringElement licenseElement = new StringElement("");
root.Add(new Section()
{ new StyledStringElement("Process", delegate {
using (Image<Bgr, Byte> image = new Image<Bgr, byte>( "license-plate.jpg"))
{
LicensePlateDetector detector = new LicensePlateDetector(".");
Stopwatch watch = Stopwatch.StartNew(); // time the detection process
List<IInputOutputArray> licensePlateImagesList = new List<IInputOutputArray>();
List<IInputOutputArray> filteredLicensePlateImagesList = new List<IInputOutputArray>();
List<RotatedRect> licenseBoxList = new List<RotatedRect>();
List<string> words = detector.DetectLicensePlate(
image,
licensePlateImagesList,
filteredLicensePlateImagesList,
licenseBoxList);
watch.Stop(); //stop the timer
messageElement.Value = String.Format("{0} milli-seconds", watch.Elapsed.TotalMilliseconds);
StringBuilder builder = new StringBuilder();
foreach (String w in words)
builder.AppendFormat("{0} ", w);
licenseElement.Value = builder.ToString();
messageElement.GetImmediateRootElement().Reload(messageElement, UITableViewRowAnimation.Automatic);
licenseElement.GetImmediateRootElement().Reload(licenseElement, UITableViewRowAnimation.Automatic);
foreach (RotatedRect box in licenseBoxList)
{
image.Draw(box, new Bgr(Color.Red), 2);
}
Size frameSize = FrameSize;
using (Mat resized = new Mat())
{
CvInvoke.ResizeForFrame(image, resized, frameSize);
imageView.Image = resized.ToUIImage();
imageView.Frame = new RectangleF(PointF.Empty, resized.Size);
}
imageView.SetNeedsDisplay();
ReloadData();
}
}
)});
root.Add(new Section("Recognition Time") { messageElement });
root.Add(new Section("License Plate") { licenseElement });
root.Add(new Section() { imageView });
}