public static string GetAnnotOptFromJsProp(this FPdf document, JsOptions prop, string colors, bool rtl = false) { var opt = new JsOptions2(); switch (prop.Alignment) { case AlignEnum.Left: opt.q = 0; break; case AlignEnum.Right: opt.q = 2; break; case AlignEnum.Center: opt.q = 1; break; case AlignEnum.Justified: throw new NotSupportedException("Justified is not supported"); break; case AlignEnum.Default: default: opt.q = rtl ? 0 : 2; break; } double lineWidth; if (prop.LineWidth.HasValue) { lineWidth = prop.LineWidth.Value; } else { lineWidth = 1; } switch (prop.BorderStyle) { case BorderStyle.None: break; case BorderStyle.Dashed: break; case BorderStyle.Beveled: break; case BorderStyle.Inset: break; case BorderStyle.Underline: break; case BorderStyle.Solid: break; default: throw new ArgumentOutOfRangeException(); } opt.Border = new double { }; return(string.Empty); }
public override string ToString() => JsOptions.Serialize(this);