|
@@ -146,10 +146,10 @@ namespace ComPDFKit.Controls.Measure.Property
|
|
var fontType = CFontNameHelper.GetFontType(selectItem.Content.ToString());
|
|
var fontType = CFontNameHelper.GetFontType(selectItem.Content.ToString());
|
|
string FontName = CFontNameHelper.ObtainFontName(fontType, polygonMeasureParam.IsBold, polygonMeasureParam.IsItalic);
|
|
string FontName = CFontNameHelper.ObtainFontName(fontType, polygonMeasureParam.IsBold, polygonMeasureParam.IsItalic);
|
|
polygonMeasureParam.FontName = FontName;
|
|
polygonMeasureParam.FontName = FontName;
|
|
- PolygonMeasureParamChanged?.Invoke(sender, polygonMeasureParam);
|
|
|
|
|
|
+ PolygonMeasureParamChanged?.Invoke(sender, polygonMeasureParam);
|
|
}
|
|
}
|
|
if (Annotation != null && ViewControl != null)
|
|
if (Annotation != null && ViewControl != null)
|
|
- {
|
|
|
|
|
|
+ {
|
|
if (selectItem != null && selectItem.Content != null)
|
|
if (selectItem != null && selectItem.Content != null)
|
|
{
|
|
{
|
|
CTextAttribute textAttr = Annotation.GetTextAttribute();
|
|
CTextAttribute textAttr = Annotation.GetTextAttribute();
|
|
@@ -213,7 +213,7 @@ namespace ComPDFKit.Controls.Measure.Property
|
|
if (Annotation == null)
|
|
if (Annotation == null)
|
|
{
|
|
{
|
|
polygonMeasureParam.FillColor = color;
|
|
polygonMeasureParam.FillColor = color;
|
|
- if(checkBrush.Color != Colors.Transparent)
|
|
|
|
|
|
+ if (checkBrush.Color != Colors.Transparent)
|
|
{
|
|
{
|
|
polygonMeasureParam.HasFillColor = true;
|
|
polygonMeasureParam.HasFillColor = true;
|
|
}
|
|
}
|
|
@@ -225,7 +225,14 @@ namespace ComPDFKit.Controls.Measure.Property
|
|
}
|
|
}
|
|
if (Annotation != null && ViewControl != null)
|
|
if (Annotation != null && ViewControl != null)
|
|
{
|
|
{
|
|
- Annotation.SetBgColor(color);
|
|
|
|
|
|
+ if (checkBrush.Color == Colors.Transparent)
|
|
|
|
+ {
|
|
|
|
+ Annotation.ClearBgColor();
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Annotation.SetBgColor(color);
|
|
|
|
+ }
|
|
Annotation.UpdateAp();
|
|
Annotation.UpdateAp();
|
|
ViewControl.UpdateAnnotFrame();
|
|
ViewControl.UpdateAnnotFrame();
|
|
}
|
|
}
|
|
@@ -380,6 +387,33 @@ namespace ComPDFKit.Controls.Measure.Property
|
|
|
|
|
|
Color lineColor = Color.FromRgb(param.LineColor[0], param.LineColor[1], param.LineColor[2]);
|
|
Color lineColor = Color.FromRgb(param.LineColor[0], param.LineColor[1], param.LineColor[2]);
|
|
BorderColorPickerControl.SetCheckedForColor(lineColor);
|
|
BorderColorPickerControl.SetCheckedForColor(lineColor);
|
|
|
|
+ if(Annotation != null)
|
|
|
|
+ {
|
|
|
|
+ if (!Annotation.HasBgColor)
|
|
|
|
+ {
|
|
|
|
+ FillColorPickerControl.SetCheckedForColor(Colors.Transparent);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Color fillColor = Color.FromRgb(param.FillColor[0], param.FillColor[1], param.FillColor[2]);
|
|
|
|
+ FillColorPickerControl.SetCheckedForColor(fillColor);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ if (!param.HasFillColor)
|
|
|
|
+ {
|
|
|
|
+ FillColorPickerControl.SetCheckedForColor(Colors.Transparent);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Color fillColor = Color.FromRgb(param.FillColor[0], param.FillColor[1], param.FillColor[2]);
|
|
|
|
+ FillColorPickerControl.SetCheckedForColor(fillColor);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Color FontColor = Color.FromRgb(param.FontColor[0], param.FontColor[1], param.FontColor[2]);
|
|
|
|
+ FontColorPickerControl.SetCheckedForColor(FontColor);
|
|
|
|
+
|
|
if (polygonMeasureParam.BorderStyle == C_BORDER_STYLE.BS_SOLID)
|
|
if (polygonMeasureParam.BorderStyle == C_BORDER_STYLE.BS_SOLID)
|
|
{
|
|
{
|
|
CPDFLineStyleControl.DashStyle = DashStyles.Solid;
|
|
CPDFLineStyleControl.DashStyle = DashStyles.Solid;
|