koszeggy / kgysoft.drawing.tools Goto Github PK
View Code? Open in Web Editor NEWDebugger visualizers and image editor apps built on KGy SOFT Drawing Libraries
Home Page: https://kgysoft.net/drawing
License: Other
Debugger visualizers and image editor apps built on KGy SOFT Drawing Libraries
Home Page: https://kgysoft.net/drawing
License: Other
In this small test sample:
ULONG_PTR gdiplusToken;
GdiplusStartupInput gdiplusStartupInput;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
int width, height = 200;
Bitmap bitmap(width, height, PixelFormat32bppARGB);
Graphics graphics(&bitmap);
SolidBrush brush(Color(255, 255, 0, 0));
graphics.FillRectangle(&brush, 0, 0, width, height);
CLSID pngClsid;
GetEncoderClsid(L"image/png", &pngClsid);
bitmap.Save(L"test.png", &pngClsid, NULL);
When i hover bitmap
or graphics
i'm not seeing the magnifier icon, neither in the debugger watch window.
Also, is it possible to preview HBITMAPs?
I'm using VS22 17.6.5
I have installed the extension from the market place.
I also checked KGySoft.Drawing.ImagingTools.exe
at Documents
When I try to visualize a Graphics, an exception occurs:
No problem when visualizing the Bitmap.
My code :
using (Bitmap b = new(@"c:\temp\Image 01_C - 24 bits.png"))
{
using (Graphics g = Graphics.FromImage(b))
{
g.DrawEllipse(Pens.Green, 10, 20, 100, 200);
g.DrawString("hello", SystemFonts.DefaultFont, Brushes.Red, default(PointF));
}
}
The breakpoint is juste after g.Drawing so Graphics is not disposed.
VS : Version 16.11.4
Application : Windows Forms on .NET 5, 32 and 64 bits, Debug.
dotnet --version : 5.0.401
Windows Update : up-to-date
No problem with a Windows Forms application on .NET Framework 4.8, 32 and 64 bits, Debug.
The stack:
at KGySoft.Throw.InvalidOperationException(String message)
at KGySoft.Reflection.Accessors.GetPropertyValue(Object instance, String propertyName)
at KGySoft.Reflection.Accessors.IsSzArray(Type type)
at KGySoft.CoreLibraries.TypeExtensions.IsZeroBasedArray(Type type)
at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteTypeNamesAndRanks(BinaryWriter bw, Type type, DataTypesEnumerator enumerator, Boolean allowOpenTypes)
at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteRootCollection(BinaryWriter bw, Object data, DataTypes dataType)
at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializationManager.WriteRoot(BinaryWriter bw, Object obj)
at KGySoft.Serialization.Binary.BinarySerializationFormatter.SerializeByWriter(BinaryWriter writer, Object data)
at KGySoft.Serialization.Binary.BinarySerializer.SerializeByWriter(BinaryWriter writer, Object data, BinarySerializationOptions options)
at KGySoft.Drawing.DebuggerVisualizers.Serialization.GraphicsSerializationInfo.Write(BinaryWriter bw)
at KGySoft.Drawing.DebuggerVisualizers.Serialization.SerializationHelper.SerializeGraphicsInfo(Graphics g, Stream outgoingData)
at KGySoft.Drawing.DebuggerVisualizers.Serialization.GraphicsSerializer.GetData(Object target, Stream outgoingData)
at Microsoft.VisualStudio.DebuggerVisualizers.DebuggeeSide.Impl.ClrCustomVisualizerDebuggeeHost.GetData(Object visualizedObject)
For example it can be blank after the application is closed:
Apparently, VS cannot read Program.cs again.
I can't even cancel that. I have to kill VS process.
No more problems after having uninstalled the extension.
VS : Version 16.11.4
Application : Windows Forms on .NET 5
dotnet --version : 5.0.401
Windows Update : up-to-date
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.