This commit is contained in:
Jonathan Jenne
2023-11-13 13:15:04 +01:00
parent 623cf43520
commit 5302f0dff5
10 changed files with 198 additions and 66 deletions

View File

@@ -1,4 +1,5 @@
Imports System.Drawing
Imports DevExpress.Utils.Svg
Imports DigitalData.Modules.Base
Imports EnvelopeGenerator.Common.Constants
@@ -12,6 +13,13 @@ Public Class EnvelopeReceiver
End Get
End Property
Public ReadOnly Property Image As SvgBitmap
Get
Return SvgBitmap.FromFile("Images/circle.svg")
End Get
End Property
Public Property ColorType As ColorType

View File

@@ -45,6 +45,7 @@
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DigitalData.Modules.Base, Version=1.3.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
@@ -196,5 +197,10 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Images\circle.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -1,4 +1,5 @@
Imports System.Drawing
Imports DevExpress.Utils.Svg
Imports EnvelopeGenerator.Common.Constants
Public Class Helpers
@@ -71,4 +72,17 @@ Public Class Helpers
End Select
End Function
Public Shared Function GetColorCircle(pBaseImage As SvgImage, pColor As Color) As SvgImage
Dim oColoredImage As SvgImage = pBaseImage.
Clone(Sub(el As SvgElement, table As Hashtable)
If TypeOf el Is SvgCircle Then
el.Styles.Clear()
table("StyleName") = String.Empty
table("Fill") = ColorTranslator.ToHtml(pColor)
End If
End Sub)
Return oColoredImage
End Function
End Class

View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-circle-fill" viewBox="0 0 16 16">
<circle cx="8" cy="8" r="8"/>
</svg>

After

Width:  |  Height:  |  Size: 168 B