|
/////////////////////////////////////////////////////////////////////////////////
// NeoDataType Another Graphic Engine
// --------------------
// Project Copyright (C) : Fabio Zanetta, email: support@neodatatype.net
// Portions Copyright (C) : Microsoft Corporation. All Rights Reserved.
// License : docs/license.txt
// ------------------------------------------------------------------------------
// File created by : Fabio Zanetta, email: support@neodatatype.net
// ------------------------------------------------------------------------------
// Please, if you modify some parts of this file mark them as described in
// docs/modify_guidelines.txt
/////////////////////////////////////////////////////////////////////////////////
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections.Generic;
using NeoDataType.Graphic.Drawing;
using NeoDataType.Documents;
namespace NeoDataType.Graphic
{
//public delegate void PaintDelegate(Graphics g, Painter painter);
public class ScriptedPainter : Painter
{
public ScriptedPainter()
{
}
protected override void OnItemBoundsChanged()
{
base.OnItemBoundsChanged();
//Item.NotifyPropertyChangedInternal = false;
ScriptedItem si = (ScriptedItem)Item;
for (int i = 0; i < si.ItemProps.Count; i++)
{
si.ItemProps[i].AssignTo(Item, this);
}
//Console.WriteLine(Item.RotationCenter + " " + si.ItemProps[1].Value + " " + StrokePoint.Parse(".5;.5").ToAbsolutePoint(this));
foreach (PaintStroke stroke in ((ScriptedItem)(Item)).Strokes)
stroke.UpdateDynamic(this);
//Item.NotifyPropertyChangedInternal = true;
}
protected override void Paint(Graphics g)
{
foreach (PaintStroke stroke in ((ScriptedItem)Item).Strokes)
stroke.Paint(g, this);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.