VG.net Readme
Thank you for using VG.net!
This document contains notes for using VG.net. You can find additional tips and
tricks for VG.net at the development blog:
http://weblogs.asp.net/frank_hileman. The VG.net home page is
www.vgdotnet.com.
1. Getting Started
Please see the VG.net Users Guide section titled "Getting Started". You will find a shortcut
to the Users Guide on the Start Menu, under the folder VG.net.
Missing Toolbar buttons? Sometimes the toolbar buttons and context menu items
for Visual Studio fail to install correctly. If you notice missing items, please
open the Add/Remove Programs window in the Control Panel, find VG.net, click on the link
called "Click here for support information", and click on the Repair button.
2. License Agreement
The end user license agreement can be found in the file EULA.rtf,
found in the main VG.net installation folder. Please note that the file Prodige.Drawing.dll
can be redistributed, but no other files can be redistributed.
3. Support
If you have purchased a VG.net Picture Designer license, you will receive
support contact information in your email receipt. If you are using a Lite
or evaluation version of the Picture Designer, there is no official support, but please send
bug reports or comments to support at vgdotnet.com,
or post a message on the VG.net discussion forums at
www.vgdotnet.com/forums.
4. Version Numbers and Source Code Compatibility
Versions 3.x and earlier of VG.net are for use with Visual Studio 2003. Versions 4.x and
greater support Visual Studio 2005. We will keep the VG.net APIs source code compatible
between 3.x and 4.x releases, and enhancements made in version 4.x future releases will
also be made identically (as much as possible) in version 3.x future releases.
If you purchase a VG.net designer license, you will receive both 3.x and 4.x setup
files, and your source code should work for both versions.
5. Visual Studio 2005 Notes
Updgrading and Incompatibility of .resx Files
When using Visual Studio 2003, .resx files produced for Forms and UserControls
containing Pictures have data Visual Studio 2005 cannot process. To work around
this problem, delete .resx files for Forms and UserControls containing Pictures.
If the .resx files contain important information, such as bitmaps, repair them:
delete elements in the xml containing a Location property for a Picture. These
elements are type System.Drawing.Point, for example:
<data name="autoSizeTest.Location" type="System.Drawing.Point, System.Drawing,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"><value>17, 17</value>
New Features in Visual Studio 2005
Partial classes:
In Visual Studio 2005, you have the option of placing the designer-generated code
and the hand-written code for a Picture into two separate files, using a feature called
partial classes. To see an example, add a Form to a project and examine the two files
produced. The VG.net templates included for Visual Studio 2005 do not use this feature.
We did this to make the generated files backward compatible, and because
it is more convenient to copy or move a Picture by copying or moving one file.
If you wish to use partial classes, we can provide templates for this purpose.
Modifiers property:
Use this new property, under “Design,” to make the corresponding
generated field for each Element private, public, protected, shared/friend, etc.
GenerateMember property:
Use this new property, under “Design,” to specify whether a member or field
is generated for each Element. By generating members only for animated Elements, you
can reduce the memory consumed by your Picture: select each non-animated Element and
set GenerateMember to false.
C++ Picture Designer:
We believe the VG.net Picture Designer now works for C++ classes, but we did not test
this, and we have not created C++ templates. If you wish to experiment, create a
template based on the Component template.
Problems in Visual Studio 2005
Sub Picture Fields Disappear:
Avoid editing a sub (child) Picture using the Picture Designer while a parent Picture
using that sub Picture is also open in a designer. It is possible to lose the
generated fields for your sub Picture, destroying the parent Picture.
Steps to reproduce in C#:
- Create a windows application.
- Add two Pictures to your application, Picture1 and Picture2.
- Add several Shapes to Picture1.
- Build the project.
- Using the Toolbox item in the Drawing tab for Picture1, add two instances of
Picture1 to Picture2.
- Right click on the Picture2 surface to view the code. Notice there are two fields
generated, picture11 and picture12, one for each instance.
- Leaving both designers open, delete one Shape from Picture2.
- Build the project.
- Using the Toolbox item in the Drawing tab, add another instance of Picture1 to
Picture2.
- Right click on the Picture2 surface to view the code. The fields for your sub
Pictures disappeared and Picture2 will no longer compile.
The problem is in the Visual Studio code generator. Microsoft support offers the following
workaround: change the AssemblyVersion attribure to contain a wildcard (1.0.*), and
move the generated fields to the bottom of the file, after at least one is generated.
Hopefully Microsoft will release a fix for this bug. See the following feedback:
Disappearing fields when child component is modified.
Slow project open or close:
If you find your projects are opening or closing slowly, try resetting the
toolbox. The Toolbox in Visual Studio 2005 has breaking changes and may produce bad
toolbox items when using VG.net. We are working with Microsoft support to figure out this
problem. See the following feedback:
Need to prevent BrokenToolboxItem objects.
6. Changes
Versions 3.0 and 4.0
Designer Enhancements
- You may now use the Picture designer in Visual Studio 2005.
VG.net versions 3.x support Visual Studio 2003, and versions 4.x support
Visual Studio 2005.
- Trigger code when the mouse wheel is rotated using the new MouseWheel event in
Element. Read more in Run-time Only Enhancements.
- Set the new Precedence property on a Style to OverriddenByAncestors, and
the Style can be overridden by a Style with the same name in an ancestor
Picture.
Copy, paste, and cut Style objects within the Style collection editor
by right-clicking over the Style list box and selecting a command.
Alternatively, use the standard shortcuts:
- Cut = Ctrl-X
- Copy = Ctrl-C
- Paste = Ctrl-V
Styles may be copied and pasted from one designer to another. ImageData
objects referenced in ImageFills are also copied.
Run-time Only Enhancements
- Trigger code when the mouse wheel is rotated using the new MouseWheel event in
Element. MouseWheel events are directed to the Element under the mouse cursor,
and they are bubbled and captured as with other mouse events. A corresponding
PictureMouseWheel event is in Canvas and TranslucentForm.
- Styles can now be overridden by ancestor Pictures, by changing the Precedence
property. If there is any chance a Style may be overridden, call
the new method RebindOverridableStyles after adding a Style to a Picture containing
sub Pictures. The method call is only needed if the Pictures have been displayed:
Styles are bound to referencing Elements during the first display.
- If you use different TextAppearances in your Pictures, Element text
displays faster, as Fonts are now globally cached in VG.net. If you wish to
dispose cached Fonts, call the new static (Shared) method DisposeCachedFonts
in TextAppearance. The Font cache is automatically purged when all top-level
Pictures are detached from Controls, and no Picture can be displayed.
- The following writable convenience properties are added to Element: Left,
Right, Top, Bottom, CenterX, CenterY, LeftTop, RightTop, LeftBottom, and RightBottom.
- You may once again compile classes derived from BoundedShape. The internal abstract
(Friend MustOverride) method in Shape that prevented compilation is now virtual,
and a default implementation is provided.
Bug Fixes and Obsolete Members
- Displaying a PointText created with the PointText Clone method no longer throws an exception,
and the Text property is properly copied.
- Calling Form ShowDialog from a MouseDown event handler, when the displayed Form
contains a Canvas and Picture, no longer causes an exception.
Calling Application.DoEvents from a mouse event handler can no longer cause an exception
either.
- TransformationReference property settings, of type Absolute, are no longer lost if you
open a Picture in the designer and make changes.
- Moving a Picture with a ClipRectangle, when nesting in another Picture or Group
(2 or more levels down), will now properly erase the clipped sub Picture.
- The Canvas Zoom property is no longer serialized to code, as it caused strange
behavior in the designer when AutoSizePicture was set to true. Properties in
Picture that may also interfere with AutoSizePicture (Translation and Scaling) are
also no longer serialized when the Picture is in a Form or UserControl.
- If a source code control checkout dialog popped up after moving an Element,
and the checkout was canceled, the Element might remain moved. This bug is fixed.
- Certain TextAppearance settings for a PointText no longer display a wider than specified
Stroke width, causing artifacts when the PointText is moved. Specifically,
the problem occured when a TextAppearance had StrokeVisible set to true, did
not specify a Stroke Width, and did specify some other property, such as Color.
- The IList implementation in ObjectCollection (a base class) no longer allows objects
to be added to a ChildCollection or a ImageDataCollection without setting
the Parent property on the child object. The interface implementation has
been moved to the derived classes.
Version 2.7a
Designer Enhancements
Use the new TranslucentForm class to replace your entire user interface with
a top-level Picture, eliminating even the window border and caption. With this
class, and the associated DisplayInTranslucentForm method on Picture, you can
create windows with per-pixel translucency and arbitrary shapes. Edge anti-aliasing
is alpha blended, making it superior to the use of the Form Region property.
See the following article:
A Resizable Vector Graphics Calculator with Per-Pixel Translucency
- Use the new WindowOperation property on Element to specify the window operation
triggered by a mouse event on the Element when displayed in a TranslucentForm:
Close, Minimize, resize, etc. See the article link above for more information.
- Within the Forms designer, you can now drag and drop a Picture from the Toolbox
onto a Canvas to display that Picture in the Canvas. You can also select the
Toolbox item and click on a Canvas. The same operations are supported for
the new TranslucentForm class.
- Use the new BaseStyle property in the Style class to collect common appearance
properties in a single Style that can then be inherited across mutiple Styles.
BaseStyle is a string. Consider two Styles, one named Style1, and one named Common.
If you set the BaseStyle property in Style1 to "Common", Style1 will inherit
all the property settings in the Common Style. Changes to Common will change
the appearance of all Elements that reference Style1.
Samples
- Source code for the new TranslucentCalculator and TranslucentClock samples is
installed by the Extras package. The TranslucentCalculator is a "skinning"
example: it demonstrates how to create a fancy user interface with gel buttons
and 3D effects. It also demonstrates how to separate a user interface from
core application logic. Both TranslucentCalculator and TranslucentClock use
TranslucentForm.
- Use the Button base class in TranslucentCalculator to create your own custom buttons.
Run-time Only Enhancements
Bug Fixes and Obsolete Members
- A solid color Stroke, with no Color property set, but with the Opacity property
set, ignored the Width property during display. This bug is fixed.
- The FSize and Vector constructors taking Double parameters are eliminated.
This change was made to improve C++ support. Any code using these constructors,
that no longer compiles, can be fixed with an explicit cast to float, or Single in
Visual Basic, on each parameter.
- A PathGradientFill with CoordinateType set to Absolute failed to serialize correctly.
This bug is fixed.
Version 2.6b
Run-time Only Enhancements
- The new GetTextPixelBounds method in the Shape and PointText classes computes
the rectangular area enclosing all pixels displayed by text. This method
always recomputes the correct area, returning the correct result even if the
object has never been displayed. By contrast, the PixelBounds property returns
a rectangle enclosing the pixels last displayed, and cannot be used before an
object is first displayed.
Bug Fixes and Obsolete Members
- The CaptureMouse method failed to capture mouse input when called on a top-level
Picture (a Picture connected to a Canvas). The method now works correctly.
-
A non-composite Element (an Element which is not a Group or Picture) with the
Enabled property set to false failed to update its PixelBounds when a Parent was
transformed, zoomed, or panned, causing incorrect erasure or display.
This bug has been fixed.
- When a Picture was added to a System.ComponentModel.Container, mouse events would
no longer be raised. This also caused a bug in the DesignMode property, which
returned true when a Picture was added to a Container. These bugs have been fixed:
when a Picture is added to a Container, DesignMode returns false (except in Visual
Studio), and mouse events are raised.
- The TextAppearance RenderingHint property did not function correctly. An Element
with the TextAppearance.RenderingHint property set influenced the text
rendering of other Elements within a Picture. This problem has been fixed.
-
When serializing to a MyXaml file, a property tagged with a
DesignerSerializationVisibilityAttribute with a value of DesignerSerializationVisibility.Content,
which was not a collection, was incorrectly serialized in one situation: if all in
the referenced object were set to default values, the property would be serialized.
Now the property will not be serialized in that situation.
Version 2.6a
Designer Enhancements
- The new CornerRadii property in the Rectangle class allows you to create
rounded rectangles with corners where the arc radius differs in the x and
y dimensions. The new Radii structure holds values assigned to the CornerRadii
property.
Run-time Only Enhancements
- The HitTest method in Element has a new overload that takes as a parameter an
ElementCollection. Use this method when you would like to get the entire
"stack" of Elements hit by a device point. That is, you will obtain the leaf
Element hit, followed by its Parent, followed by each Parent higher in the
hierarchy.
- Use the new static FindFontFamily event in the TextAppearance class to display
dynamically loaded fonts. This event is raised whenever a TextAppearance needs to
look up a FontFamily. If you have loaded fonts
using a PrivateFontCollection, the FindFontFamily event enables you to display these
private fonts. In your event handler, examine the FamilyName property of the
FindFontFamilyEventArgs parameter. If the name matches one of your private family
names, set the FontFamily property before returning from the event handler, and
your FontFamily will be used. If there is no match, do nothing, and the normal
FontFamily searching algorithm will be used. See this forum entry for some
code samples:
http://www.vgdotnet.com/forums/viewtopic.php?t=193
- Use the new PropertyChanged event in Element to monitor property changes.
Currently this event is only raised for the Element.Parent and Picture.Control
properties. In the future, this event will be raised when for many different
property changes.
- Use the new TransformationReference.Origin field to set the TransformationReference
of an Element to (0, 0):
element1.TransformationReference = TransformationReference.Origin;
- Set the new static property, ManagedCodeOnly, in Display to true when you
build a dll that must run in a restricted security setting, such as Internet Explorer.
In the future, we will add optimizations using PInkoke that will be bypassed
when ManageCodeOnly is true.
Bug Fixes and Obsolete Members
- The Zoom To Selected command, and all selection adornments now behave
more logically with invisible Elements. Formerly, the command might zoom to the
wrong area, or the adornments might enclose the wrong area.
- A Group containing no Elements, when cloned using the Clone method, produced a Group that
threw an exception when attempting to add Elements. This bug has been fixed.
- A Group which was cloned or duplicated in the designer sometimes contained
copies of the Styles and ImageData objects referenced by children of the Group.
Because of this problem, the children of the Group would fail to update when the original
Style or ImageData was modified. This bug has been fixed.
- FRectangle structures which are transfomed by a negative scaling factor using a
Scaling or SclaingTranslation no longer result in an FRectangle with Width
or Height set to a negative number.
- The Users Guide failed to open from the Start Menu shortcuts if a Visual Studio
beta version was previously installed. This problem has been fixed.
Version 2.5
This version contained only internal changes.
Version 2.4b
Designer Enhancements
- If you wish to make all invisible Elements visible at design-time,
select the top-level Picture and set the InvisibleAreDisplayed property to true.
This has no effect at run-time.
- If you wish to be able to select disabled Elements by clicking with the mouse,
select the top-level Picture and set the property DisabledArePickable to true.
A "disabled" Element is one with Enabled set to false.
Run-time Only Enhancements
- The CustomElement copy constructor is now protected, to be used by
derived classes. We added the InternalFill, InternalStroke, and InternalTextAppearance
protected properties, as well as supporting members so that a CustomElement based
class can expose a Fill, Stroke, or TextAppearance property.
- In DrawContext, we made several members public to support CustomElement derived clases:
Font, TextBrush, GetFullTextBounds, GetTextPixelBounds, DrawText,
PushTransformation, and PopTransformation.
- We created a preliminary CustomElement sample, which draws text along an
arbitrary Shape path. If you need to build a CustomElement (an advanced topic) please
request a copy of this sample. In the future the sample will be added to the Extras
package.
Bug Fixes and Obsolete Members
- In the VG.net Designer Lite version only, if you attempted to exceed the object count limit,
the Rotation and Shearing adornments would disappear. This bug is fixed.
- Setting the Enabled property from true to false on a Shape caused problems
with mouse events and display updates, if the DrawAction was set to Fill.
This bug is fixed.
- We added an overload for the Element HitTest method:
bool HitTest(Vector point, out Element hitElement). The existing HitTest method has an
additional boolean parameter called skipDisabled. This parameter is no longer supported,
and the HitTest(Vector, bool, out Element) overload is now obsolete.
Version 2.4a
Designer Enhancements
-
Text can now draw a Stroke outlining each character. The TextAppearance class
has new Stroke, StrokeVisible, and FillVisible properties.
-
Use the new PointText Element to place text relative to a point on the screen.
PointText is specified by a single point, and never wraps. The TextAppearance
HorizontalAlignment and VerticalAlignment properties control the positioning of
PointText. Read the topic titled "PointText" in the Users Guide for more
information.
-
When using the PathGradientFill, wide and short gradients, as well as tall and
narrow gradients, are now better quality, without any reduction in speed.
-
When editing a PathGradientFill, if the FocusPoint adornment has been moved out
of the sample entirely, a click within the sample area will move the adornment
back into the sample.
-
Custom colors added to the custom color list now persist between editing
sessions.
-
The new ScrollableArea property on Picture allows you to specify the coordinate
area around which you can scroll at design-time. This allows you to easily
place Elements far outside the automatically computed scrollable area. The
ScrollableArea property, if set to any value other than (0, 0, 0, 0), will be
used by the Canvas at run-time as well, when AutoScrollPicture is true. Read
the topic titled "The Scrollable Area" in the Users Guide for more information.
-
Active Group mode is added to the Picture Designer. This mode lets you work on
Elements within a Group without ungrouping them. Read the topic titled "Active
Group Mode" in the Users Guide for more information.
-
Alignment, sizing, spacing, and centering commands have been added to the
Picture Designer. These commands are on the Layout. To show the Layout toolbar,
right click on an empty toolbar area in Visual Studio .NET. Read the topic
titled "Layout Commands" in the Users Guide for more information.
-
If you right-click on an empty area of the designer surface and select the
Paste command, the pasted Element is now located at the position of the click.
-
Pressing the Shift key when dragging the mouse to lasso a set of Elements now
adds to the existing selection, instead of replacing it. See "Selecting
Elements" in the Users Guide for more information.
-
Pressing the Control key when dragging the mouse to lasso a set of Elements now
performs a disjoint selection: previously selected Elements enclosed by the
lasso are deselected; enclosed Elements not previously selected are selected.
See "Selecting Elements" in the Users Guide for more information.
-
Pressing the Alt key when pressing down the left mouse button and dragging now
forces the Picture Designer to enter lasso mode, whereby you can select
enclosed objects. The Alt key prevents objects underneath the mouse press from
being immediately selected, so you can begin a lasso operation even if there is
no empty space on the designer surface.
-
The new RotationShearingAdornmentVisible property on the top-level Picture,
within the Picture Designer, allows you to make the rotation and shearing
adornments invisible, so they will not interfere when you have no need for
rotation or shearing.
-
The new HotkeyDisplay property on TextAppearance allows you to control how the
"&" (ampersand) character is interpreted when displaying text. The
ampersand character can now be used to underline any character in the display
string.
-
The "VG.net Picture" template file can now be selected from the "Add New
Item…" command within a web project. This makes it easier to add
Pictures to your web applications.
-
The Users Guide is updated.
Run-time Only Enhancements
-
The ElementHitTest and EnclosedTest methods have been moved from Picture to the
base class Composite, so you can now use the methods on Groups. See "Composite
class" in the Reference documentation. See "Grouping Elements" in the Users
Guide for more information on Groups.
-
The new CustomElement class is a base class you can use to create Elements with
completely custom drawing code.
-
The ElementCollection AddRange method now has an overload taking as input an
EnclosedElementCollection.
-
Improved PixelBounds calculation accuracy for all Shapes except Paths, which in
turn has improved animation performance.
-
Picture BeginInit and EndInit are now virtual, so you can override them.
Bug Fixes and Obsolete Members
-
PathGradientFill objects now print correctly.
-
The Picture ClipRectangle property now correctly clips when printing or using
Picture.RenderTo.
-
The Canvas AutoScroll property is obsolete, and will cause warnings during
compilation. The new AutoScrollPicture property replaces AutoScroll.
-
The Canvas AutoScrollMargin and AutoSizePadding properties are obsolete. The
new PicturePadding property replaces both AutoScrollMargin and AutoSizePadding.
If you currently use the AutoSizePicture property, please check to see if
PicturePadding needs to be set to (0, 0) - the default is (20, 20).
-
A line of pixels on the top and left of a Canvas were incorrectly drawn when
the BackgroundImage property was set. This bug has been fixed.
-
Many Elements no longer allow Width or Height to be set to a value less than 0,
to prevent exceptions during the display pass.
-
Unless SetBoundsCore is overridden, a Picture with a non-zero Width cannot have
its Width set to 0. The same constraint exists for Height.
-
Undo and Redo of a Closed Polyline now works correctly when editing the
Polyline points.
-
Invisible elements were drawn when printing or using the Picture RenderTo
method. This bug has been fixed.
-
Picture.Invalidate, called when a Canvas BackColor or BackgroundImage property
changed, did not cause the screen to update correctly when multiple Canvases
were used simultaneously. This bug has been fixed.
Version 2.3
Version 2.2
-
The PathGradientFill class has been added. This enables you to create radial
gradient fills, or gradient fills based on any path or Element shape. It is
very useful for 3D effects. Please see the VG.net blog for tips on using the
PathGradientFill for 3D effects: http://weblogs.asp.net/frank_hileman.
By default, PathGradientFills are cached as images for speed. You can modify
the behavior of this caching with the PathGradientFill.Quality property.
-
The PathInterpolater class, the Shape.PathInterpolator property, the
Element.PathMove method, and the PathPosition structure have been added. The
PathInterpolator object can be used to convert arc lengths to points and
tangents on a Shape, or vice-versa. It can also be used to find the closest
point on the Shape path to an arbitrary point. PathMove moves any Element along
the path defined by any Shape. PathMove will optionally rotate the Element to
align with the tangent to the path. The new PathMove sample demonstrates how to
use these new types and members.
-
The AnalogClock sample has been updated to use path gradients. The
EventHandling sample has also been given a much-needed face-lift :).
-
The following properties in LinearGradientFill have been obsoleted and replaced
by new ones: BlendFocus replaces Focus; BlendFocusScale replaced FocusScale;
CoordinateType replaces BoundsType. The FillCoordinateType enum replaces
FillBoundsType. Your existing Pictures will compile, but you can eliminate
obsolete warnings by running the ReplaceNames macro in ProdigeNameFix.vb, in
the VG.net installation folder.
-
Copying objects in the designer sometimes inverted the order in which local
appearance properties and Style references were applied -- the Style
incorrectly taking precedence. This bug has been fixed.
-
The MoveForward and SendBackward commands have been added to the Picture
Designer. These allow you to move one or more Elements forward or backward a
single index in the z-order.
-
When editing path points in the Picture Designer, control point adornments now
appear in front of anchor point adorments, making it possible to grab
previously obscured control points.
-
The Fill dialog box in the Picture Designer now displays previews of the
selected Element in the sample boxes.
-
In the Picture Designer, all changes to Style objects now immediately affect
the display surface. If you cancel a change, the changes disappear.
-
In the Picture Designer, the point editing mode is cancelled when a modal
dialog is opened.
-
The ImageDataObjects collection in a Picture is now cloned when the Picture is
cloned.
-
The Picture.DisplayInForm method now uses the monitor associated with the Form
to compute the optimum size.
-
Potential breaking change: Shape.GetGraphicsPath is now called
GetTransformedGraphicsPath, and GetGraphicsPath now returns an untransformed
GraphicsPath. The method Shape.AddToGraphicsPath has been added.
-
The gradient displayed by LinearGradientFill objects can now be defined using
two points instead of a rectangle. This is useful when rotating a gradient
within a circular or elliptical object, such as an Ellipse, Arc, or Pie. The
StartPoint and EndPoint properties define a vector for the gradient line.
-
The Click and DoubleClick events are now correctly raised only for Elements
which also received a MouseDown event. Formerly, it would be raised for any
Element over which a mouse button was released.
-
It is now possible to repair a VG.net installation without keycode errors.
-
The new Element.GetTopPicture method returns the top-level Picture displaying
an Element. The new Element.GetCanvas method returns the Canvas displaying an
Element.
-
Added the RelativeToAbsoluteRectangle method to the FRectangle class, and the
RelativeToAbsolutePoint method to the Vector class.
-
Added the DistanceToSegment method to the Vector class, for computing the
distance from a point to a line segment.
-
The reference bounding box used to display linear and path gradient fills for
text is now "tighter" -- fitting the text bounds more closely. Formerly the
Element bounds was used. Now you can create more dramatic gradients without
editing the Bounds property of the LinearGradientFill.
-
A new ScalingTranslation constructor has been added for creating a
ScalingTranslation that transforms a source rectangle to a destination
rectangle using a scaling equal in both dimensions. This constructor has a
Boolean third parameter.
-
MultiPointShape objects with a zero-sized Width and Height no longer throw an
exception during the display pass.
Version 2.1b
-
Multi-line text can now be entered into any Shape in the Picture designer. Use
the "..." button to open a dialog box in which you can enter multi-line text.
-
The rotation and shear adornments are hidden in the Picture designer when an
Element is less than 20 pixels long and wide. To show the adornments for small
Elements, zoom in, or select the Element and use "Zoom to Selected" in the
Drawing toolbar.
-
The ImageZoom sample has been added to the Extras package for VG.net customers.
This sample demonstrates how to use the ClipRectangle property and
ZoomToParentRectangle method to zoom to selected areas of an Image. The sample
is not included in the Lite version.
-
The Scalability sample incorrectly computed average modification times; they
were consistently low. This bug has been fixed.
-
TextAppearance and Stroke objects with a SolidFill with only Opacity set (not
Color) did not correctly serialize the Opacity, and instead serialized the
Color, making it impossible to set only opacity. This bug has been fixed.
-
The ClipRectangle property can now be set on a Sub Picture within the designer.
-
The ClipRectangle on a Picture now affects its PixelBounds (it is intersected)
as well as the internal bounds reported to any Parent of the Picture, when that
Parent computes its own Bounds.
-
The ZoomToParentRectangle method was added to Picture. This method is used in
conjunction with ClipRectangle to zoom a SubPicture to a rectangle specified in
the Parent coordinate space.
-
Resizing or moving a Sub Picture within the designer will now resize and move
the ClipRectangle on that Sub Picture.
-
The ClipRectangle on a Sub Picture now correctly prevents mouse events from
being raised on the clipped portion of child Elements.
-
In some circumstances, setting the ClipRectangle on a Sub Picture could cause
incorrect rendering of Elements higher in the z-order. This bug has been fixed.
-
Sub Pictures with a ClipRectangle set cannot be grouped within the Picture
designer. This restriction was made to prevent problems when later transforming
the Group. The ClipRectangle property is specifically for creating "view ports"
on the objects within a Sub Picture.
-
Dragging and dropping a set of Elements from one designer to another could not
always be "undone" correctly. The designer transaction was incorrectly
recorded. This bug has been fixed.
-
The Stroke TransformWidth property, when set to false, now produces the correct
pen width when the Picture PageUnit or PageScale properties are set to
non-default values.
-
Polylines with a zero sized width or height no longer throw an exception if
rendered with a LinearGradientFill Stroke.
Version 2.1
-
The WebControls sample has been added. This sample demonstrates how to use
VG.net graphics within an Internet Explorer client. Any VG.net-based Control
can be used in Internet Explorer. The sample also demonstrates how to use a
single Style object to modify the base color of an entire user interface. The
source code for this sample is in the Extras package available to VG.net
customers. The source code is not included in the Lite version.
-
The Sockets sample has been added. This sample is divided into two parts: a
client and a server. The server generates simulated real-time data and sends
that data to the client via TCP/IP. The client provides a visualization using
some vector graphics components.
-
The ToolTip sample has been added, demonstrating how to use the new MouseHover
event available on every Element. This sample also demonstrates how to use
IExtenderProvider to provide pseudo-properties on Elements.
-
The Scalability sample has been added. This sample provides a framework for
performance testing. It is used by the VG.net developers to test and optimize
the display engine. The sample can test from 1,000 to 500,000 VG.net Elements.
-
The Picture designer now has basic printing support for Pictures. This feature
is not available in the Lite version.
-
The RenderTo(Graphics) function has been added to Picture. This function serves
several purposes. You might use it to add printing support to your
applications, or you might use it to render Pictures to bitmaps on a web
server, and transmit the bitmaps to the web client. This function is not
available in the Lite version.
-
The MouseHover event has been added. This event is raised on every enabled
Element whenever the mouse pointer hovers over the Element for the time
specified in Picture.MouseHoverTime.
-
The CaptureMouse and ReleaseMouseCapture functions have been added to Element.
CaptureMouse captures all mouse move events, directing them toward a single
Element, until ReleaseMouseCapture is called. With these functions, you can
create sliders and knobs that behave in the same way as a Windows.Forms slider.
-
The Stroke.TransformWidth property now works correctly, and can be set within
the Stroke properties dialog in the Picture Designer. TransformWidth defaults
to true. When a Stroke's TransformWidth is set to false, Shape lines and edges
do not change width as you zoom in and out. The width is constant, regardless
of the transformations on Shape or its parents.
-
The performance of the run-time engine has been improved.
-
A call to Picture.Elements.DisposeAll now correctly causes the erasure of all
disposed Elements.
-
Invisible Elements that were made visible once incorrectly raised mouse events
(acting as if enabled). Invisible Elements now correctly behave as if Enabled
equals false, under all circumstances.
-
Several changes were made to simplify the use of VG.net Pictures within
Internet Explorer. It is no longer necessary to give Prodige.Drawing.dll any
special permissions. Addionally, thread safety was added to critical data
structures (IE uses multi-threading even for paint events).
-
The AutoSizePicture property in Canvas sometimes caused Pictures to be
incorrectly positioned. This bug has been fixed.
-
BoundedElement objects (Rectangle, Circle, etc) no longer throw exceptions
during the display pass if Width or Height is set to 0.
-
Pictures contained in external assemblies could not be added to the Visual
Studio .NET ToolBox. This bug has been fixed.
-
Images saved within MyXaml files from the Picture Designer now correctly save
in their original format, instead of converting to PNG.
-
Tag properties containing strings now serialize correctly to MyXaml.
-
Prodige assemblies are now installed in the GAC. The prevents an error from
occuring when a Picture is opened after previously opening a closing a solution
in Visual Studio .NET.
7. Future Features
To request an enhancment, please post to the Enhancements forum at:
www.vgdotnet.com/forums
Some possible future features:
-
A way to select overridable Style names in sub Pictures when editing a Style
name.
-
A MicroDesigner developement framework to simplify the construction of custom
designers. Please read about this on the VG.net forums:
www.vgdotnet.com/forums
-
Layout engines, including integrated support for anchoring and docking.
-
A port to the Compact Framework. If you need such a version, please let us
know.
-
Integrated support for shadows.
-
Digital filter effects, such as blurring, and the ability to add custom
filters.
-
Very fast scrolling using BitBlt and eliminating the recomputation of Element
PixelBounds when scrolling a integral number of pixels.
-
Buffering of an Element or the background behind an Element, to speed up
complex, non-animated objects.
-
Aggressive pruning of Elements whose geometry lies outside the clipping
region, preventing the computation of the Element PixelBounds when pruned.
Currently we compute the PixelBounds, since many Elements (thick lines, text) may
extend past their geometric bounds into the clipping region. Aggressive pruning
speeds up scrolling and zooming on thousands of objects, when a smaller percentage
overlap the clipping region.
-
A Layer property on each Element, containing a string, will allow you to assign
any Element, at any level, to a Canvas-wide Layer. You can toggle the
visibility or Enabled property on all Elements associated with a particular
layer by modifying a property on the Layer. This is useful for showing/hiding
levels of detail in large scale SCADA and map displays.
-
Currently, the transformation reference point can be set in the Properties
window. We will add a way to modify the reference point by dragging the mouse.
-
Automatically create a Canvas displaying a Picture when a Picture is dropped
onto a Form or UserControl.
-
When the user selects a sub-Picture, the Properties window will list the Styles
defined in that sub-Picture, and the user will be able to modify these Styles,
or remap them to other Styles.
-
Clipping on Groups.
-
Path clipping on Pictures. Rectangular clipping is currently supported.
-
An Opacity property for an entire Element or Picture; currently opacity is
defined separately for each BrushStyle or PenStyle.