Documentation
¶
Overview ¶
Package object is part of the go-fastreport library, a pure Go port of FastReport .NET.
Index ¶
- func SerializeCap(prefix string, w report.Writer, c, def CapSettings)
- type AdvMatrixCell
- type AdvMatrixColumn
- type AdvMatrixDescriptor
- type AdvMatrixObject
- type AdvMatrixRow
- type AutoShrinkMode
- type BarcodeObject
- func (b *BarcodeObject) AllowExpressions() bool
- func (b *BarcodeObject) AutoSize() bool
- func (b *BarcodeObject) BarcodeType() string
- func (b *BarcodeObject) DataColumn() string
- func (b *BarcodeObject) Deserialize(r report.Reader) error
- func (b *BarcodeObject) Expression() string
- func (b *BarcodeObject) GetData(calc func(string) (any, error))
- func (b *BarcodeObject) GetExpressions() []string
- func (b *BarcodeObject) RestoreState()
- func (b *BarcodeObject) SaveState()
- func (b *BarcodeObject) Serialize(w report.Writer) error
- func (b *BarcodeObject) SetAllowExpressions(v bool)
- func (b *BarcodeObject) SetAutoSize(v bool)
- func (b *BarcodeObject) SetBarcodeType(v string)
- func (b *BarcodeObject) SetDataColumn(s string)
- func (b *BarcodeObject) SetExpression(s string)
- func (b *BarcodeObject) SetShowText(v bool)
- func (b *BarcodeObject) SetText(v string)
- func (b *BarcodeObject) ShowText() bool
- func (b *BarcodeObject) Text() string
- type CapSettings
- type CapStyle
- type CellularTextObject
- func (c *CellularTextObject) BaseName() string
- func (c *CellularTextObject) CellHeight() float32
- func (c *CellularTextObject) CellWidth() float32
- func (c *CellularTextObject) Deserialize(r report.Reader) error
- func (c *CellularTextObject) HorzSpacing() float32
- func (c *CellularTextObject) Serialize(w report.Writer) error
- func (c *CellularTextObject) SetCellHeight(v float32)
- func (c *CellularTextObject) SetCellWidth(v float32)
- func (c *CellularTextObject) SetHorzSpacing(v float32)
- func (c *CellularTextObject) SetVertSpacing(v float32)
- func (c *CellularTextObject) SetWordWrap(v bool)
- func (c *CellularTextObject) TypeName() string
- func (c *CellularTextObject) VertSpacing() float32
- func (c *CellularTextObject) WordWrap() bool
- type CheckBoxObject
- func (c *CheckBoxObject) CheckColor() color.RGBA
- func (c *CheckBoxObject) CheckWidthRatio() float32
- func (c *CheckBoxObject) Checked() bool
- func (c *CheckBoxObject) CheckedSymbol() CheckedSymbol
- func (c *CheckBoxObject) DataColumn() string
- func (c *CheckBoxObject) Deserialize(r report.Reader) error
- func (c *CheckBoxObject) Editable() bool
- func (c *CheckBoxObject) Expression() string
- func (c *CheckBoxObject) GetData(calc func(string) (any, error))
- func (c *CheckBoxObject) GetExpressions() []string
- func (c *CheckBoxObject) HideIfUnchecked() bool
- func (c *CheckBoxObject) Serialize(w report.Writer) error
- func (c *CheckBoxObject) SetCheckColor(col color.RGBA)
- func (c *CheckBoxObject) SetCheckWidthRatio(v float32)
- func (c *CheckBoxObject) SetChecked(v bool)
- func (c *CheckBoxObject) SetCheckedSymbol(s CheckedSymbol)
- func (c *CheckBoxObject) SetDataColumn(s string)
- func (c *CheckBoxObject) SetEditable(v bool)
- func (c *CheckBoxObject) SetExpression(s string)
- func (c *CheckBoxObject) SetHideIfUnchecked(v bool)
- func (c *CheckBoxObject) SetUncheckedSymbol(s UncheckedSymbol)
- func (c *CheckBoxObject) UncheckedSymbol() UncheckedSymbol
- type CheckedSymbol
- type ContainerObject
- func (c *ContainerObject) AddChild(child report.Base)
- func (c *ContainerObject) AfterLayoutEvent() string
- func (c *ContainerObject) BeforeLayoutEvent() string
- func (c *ContainerObject) CanContain(child report.Base) bool
- func (c *ContainerObject) Deserialize(r report.Reader) error
- func (c *ContainerObject) FireAfterLayout()
- func (c *ContainerObject) FireBeforeLayout()
- func (c *ContainerObject) GetChildObjects(list *[]report.Base)
- func (c *ContainerObject) GetChildOrder(child report.Base) int
- func (c *ContainerObject) Objects() *report.ObjectCollection
- func (c *ContainerObject) RemoveChild(child report.Base)
- func (c *ContainerObject) Serialize(w report.Writer) error
- func (c *ContainerObject) SetAfterLayoutEvent(s string)
- func (c *ContainerObject) SetBeforeLayoutEvent(s string)
- func (c *ContainerObject) SetChildOrder(child report.Base, order int)
- func (c *ContainerObject) UpdateLayout(dx, dy float32)
- type DigitalSignatureObject
- func (d *DigitalSignatureObject) BaseName() string
- func (d *DigitalSignatureObject) Deserialize(r report.Reader) error
- func (d *DigitalSignatureObject) Placeholder() string
- func (d *DigitalSignatureObject) Serialize(w report.Writer) error
- func (d *DigitalSignatureObject) SetPlaceholder(v string)
- func (d *DigitalSignatureObject) TypeName() string
- type Duplicates
- type HorzAlign
- type HtmlObject
- func (h *HtmlObject) ApplyCondition(c style.HighlightCondition)
- func (h *HtmlObject) Assign(src *HtmlObject)
- func (h *HtmlObject) CalcWidth() float32
- func (h *HtmlObject) Deserialize(r report.Reader) error
- func (h *HtmlObject) GetExpressions() []string
- func (h *HtmlObject) RestoreState()
- func (h *HtmlObject) RightToLeft() bool
- func (h *HtmlObject) SaveState()
- func (h *HtmlObject) Serialize(w report.Writer) error
- func (h *HtmlObject) SetRightToLeft(v bool)
- type ImageAlign
- type ImageFormat
- type LineObject
- func (l *LineObject) Assign(src *LineObject)
- func (l *LineObject) DashPattern() []float32
- func (l *LineObject) Deserialize(r report.Reader) error
- func (l *LineObject) Diagonal() bool
- func (l *LineObject) Serialize(w report.Writer) error
- func (l *LineObject) SetDashPattern(dp []float32)
- func (l *LineObject) SetDiagonal(v bool)
- type LineSpacingType
- type MSChartObject
- func (m *MSChartObject) BaseName() string
- func (m *MSChartObject) Deserialize(r report.Reader) error
- func (m *MSChartObject) DeserializeChild(childType string, r report.Reader) bool
- func (m *MSChartObject) RenderToImage(w, h int) image.Image
- func (m *MSChartObject) Serialize(w report.Writer) error
- func (m *MSChartObject) TypeName() string
- type MSChartSeries
- type MapLayer
- type MapObject
- type MatrixButton
- type MergeMode
- type Padding
- type ParagraphFormat
- type PathPoint
- type PathPointType
- type PictureObject
- func (p *PictureObject) Deserialize(r report.Reader) error
- func (p *PictureObject) HasImage() bool
- func (p *PictureObject) ImageData() []byte
- func (p *PictureObject) ImageFormat() ImageFormat
- func (p *PictureObject) Serialize(w report.Writer) error
- func (p *PictureObject) SetImageData(data []byte)
- func (p *PictureObject) SetImageDataWithFormat(data []byte, fmt ImageFormat)
- func (p *PictureObject) SetTile(v bool)
- func (p *PictureObject) SetTransparency(v float32)
- func (p *PictureObject) Tile() bool
- func (p *PictureObject) Transparency() float32
- type PictureObjectBase
- func (p *PictureObjectBase) Angle() int
- func (p *PictureObjectBase) DataColumn() string
- func (p *PictureObjectBase) Deserialize(r report.Reader) error
- func (p *PictureObjectBase) GetData(calc func(string) (any, error))
- func (p *PictureObjectBase) GetExpressions() []string
- func (p *PictureObjectBase) Grayscale() bool
- func (p *PictureObjectBase) ImageAlign() ImageAlign
- func (p *PictureObjectBase) ImageLocation() string
- func (p *PictureObjectBase) ImageSourceExpression() string
- func (p *PictureObjectBase) MaxHeight() float32
- func (p *PictureObjectBase) MaxWidth() float32
- func (p *PictureObjectBase) Padding() Padding
- func (p *PictureObjectBase) RestoreState()
- func (p *PictureObjectBase) SaveState()
- func (p *PictureObjectBase) Serialize(w report.Writer) error
- func (p *PictureObjectBase) SetAngle(a int)
- func (p *PictureObjectBase) SetDataColumn(s string)
- func (p *PictureObjectBase) SetGrayscale(v bool)
- func (p *PictureObjectBase) SetImageAlign(a ImageAlign)
- func (p *PictureObjectBase) SetImageLocation(s string)
- func (p *PictureObjectBase) SetImageSourceExpression(s string)
- func (p *PictureObjectBase) SetMaxHeight(v float32)
- func (p *PictureObjectBase) SetMaxWidth(v float32)
- func (p *PictureObjectBase) SetPadding(pd Padding)
- func (p *PictureObjectBase) SetShowErrorImage(v bool)
- func (p *PictureObjectBase) SetSizeMode(m SizeMode)
- func (p *PictureObjectBase) ShowErrorImage() bool
- func (p *PictureObjectBase) SizeMode() SizeMode
- type PolyLineObject
- func (p *PolyLineObject) Assign(src *PolyLineObject)
- func (p *PolyLineObject) CenterX() float32
- func (p *PolyLineObject) CenterY() float32
- func (p *PolyLineObject) DashPattern() []float32
- func (p *PolyLineObject) Deserialize(r report.Reader) error
- func (p *PolyLineObject) GetPath(left, top, right, bottom, scaleX, scaleY float32) []PathPoint
- func (p *PolyLineObject) Points() *PolyPointCollection
- func (p *PolyLineObject) RecalculateBounds()
- func (p *PolyLineObject) Serialize(w report.Writer) error
- func (p *PolyLineObject) SetCenterX(v float32)
- func (p *PolyLineObject) SetCenterY(v float32)
- func (p *PolyLineObject) SetDashPattern(dp []float32)
- func (p *PolyLineObject) SetPolyLine(newPoints [][2]float32)
- type PolyPoint
- type PolyPointCollection
- func (c *PolyPointCollection) Add(p *PolyPoint)
- func (c *PolyPointCollection) Clear()
- func (c *PolyPointCollection) Clone() *PolyPointCollection
- func (c *PolyPointCollection) Get(i int) *PolyPoint
- func (c *PolyPointCollection) Insert(index int, p *PolyPoint)
- func (c *PolyPointCollection) Len() int
- func (c *PolyPointCollection) Remove(index int)
- type PolygonObject
- func (pg *PolygonObject) Assign(src *PolygonObject)
- func (pg *PolygonObject) Deserialize(r report.Reader) error
- func (pg *PolygonObject) GetPath(left, top, right, bottom, scaleX, scaleY float32) []PathPoint
- func (pg *PolygonObject) RecalculateBounds()
- func (pg *PolygonObject) Serialize(w report.Writer) error
- func (pg *PolygonObject) SetPolyLine(newPoints [][2]float32)
- type ProcessAt
- type RFIDBank
- type RFIDBankFormat
- type RFIDErrorHandle
- type RFIDLabel
- func (r *RFIDLabel) Assign(src *RFIDLabel)
- func (r *RFIDLabel) BaseName() string
- func (r *RFIDLabel) Deserialize(rd report.Reader) error
- func (r *RFIDLabel) PlaceholderText() string
- func (r *RFIDLabel) Serialize(w report.Writer) error
- func (r *RFIDLabel) SetRewriteEPCBank(v bool)
- func (r *RFIDLabel) SetUseAdjustForEPC(v bool)
- func (r *RFIDLabel) TypeName() string
- type RFIDLockType
- type RichObject
- func (r *RichObject) BaseName() string
- func (r *RichObject) CanGrow() bool
- func (r *RichObject) Deserialize(rd report.Reader) error
- func (r *RichObject) Serialize(w report.Writer) error
- func (r *RichObject) SetCanGrow(v bool)
- func (r *RichObject) SetText(v string)
- func (r *RichObject) Text() string
- func (r *RichObject) TypeName() string
- type SVGObject
- type ShapeKind
- type ShapeObject
- func (s *ShapeObject) Assign(src *ShapeObject)
- func (s *ShapeObject) Curve() float32
- func (s *ShapeObject) DashPattern() []float32
- func (s *ShapeObject) Deserialize(r report.Reader) error
- func (s *ShapeObject) Serialize(w report.Writer) error
- func (s *ShapeObject) SetCurve(v float32)
- func (s *ShapeObject) SetDashPattern(dp []float32)
- func (s *ShapeObject) SetShape(k ShapeKind)
- func (s *ShapeObject) Shape() ShapeKind
- type SizeMode
- type SparklineObject
- type StringTrimming
- type SubreportObject
- func (s *SubreportObject) Assign(src *SubreportObject)
- func (s *SubreportObject) Deserialize(r report.Reader) error
- func (s *SubreportObject) PrintOnParent() bool
- func (s *SubreportObject) ReportName() string
- func (s *SubreportObject) ReportPageName() string
- func (s *SubreportObject) Serialize(w report.Writer) error
- func (s *SubreportObject) SetPrintOnParent(v bool)
- func (s *SubreportObject) SetReportName(name string)
- func (s *SubreportObject) SetReportPageName(name string)
- type TextObject
- func (t *TextObject) AddHighlight(c style.HighlightCondition)
- func (t *TextObject) Angle() int
- func (t *TextObject) ApplyStyle(entry *style.StyleEntry)
- func (t *TextObject) AutoShrink() AutoShrinkMode
- func (t *TextObject) AutoShrinkMinSize() float32
- func (t *TextObject) AutoWidth() bool
- func (t *TextObject) Clip() bool
- func (t *TextObject) Deserialize(r report.Reader) error
- func (t *TextObject) DeserializeChild(childType string, r report.Reader) bool
- func (t *TextObject) FirstTabOffset() float32
- func (t *TextObject) Font() style.Font
- func (t *TextObject) FontWidthRatio() float32
- func (t *TextObject) ForceJustify() bool
- func (t *TextObject) Formats() *format.Collection
- func (t *TextObject) GetExpressions() []string
- func (t *TextObject) Highlights() []style.HighlightCondition
- func (t *TextObject) HorzAlign() HorzAlign
- func (t *TextObject) LineHeight() float32
- func (t *TextObject) MergeMode() MergeMode
- func (t *TextObject) ParagraphFormat() ParagraphFormat
- func (t *TextObject) ParagraphOffset() float32
- func (t *TextObject) RightToLeft() bool
- func (t *TextObject) Serialize(w report.Writer) error
- func (t *TextObject) SetAngle(a int)
- func (t *TextObject) SetAutoShrink(m AutoShrinkMode)
- func (t *TextObject) SetAutoShrinkMinSize(v float32)
- func (t *TextObject) SetAutoWidth(v bool)
- func (t *TextObject) SetClip(v bool)
- func (t *TextObject) SetFirstTabOffset(v float32)
- func (t *TextObject) SetFont(f style.Font)
- func (t *TextObject) SetFontWidthRatio(r float32)
- func (t *TextObject) SetForceJustify(v bool)
- func (t *TextObject) SetFormats(fc *format.Collection)
- func (t *TextObject) SetHighlights(h []style.HighlightCondition)
- func (t *TextObject) SetHorzAlign(a HorzAlign)
- func (t *TextObject) SetLineHeight(v float32)
- func (t *TextObject) SetMergeMode(m MergeMode)
- func (t *TextObject) SetParagraphFormat(pf ParagraphFormat)
- func (t *TextObject) SetParagraphOffset(v float32)
- func (t *TextObject) SetRightToLeft(v bool)
- func (t *TextObject) SetTabPositions(positions []float32)
- func (t *TextObject) SetTabWidth(v float32)
- func (t *TextObject) SetTextColor(c color.RGBA)
- func (t *TextObject) SetTextOutline(v style.TextOutline)
- func (t *TextObject) SetTextRenderType(r TextRenderType)
- func (t *TextObject) SetTrimming(v StringTrimming)
- func (t *TextObject) SetUnderlines(v bool)
- func (t *TextObject) SetVertAlign(a VertAlign)
- func (t *TextObject) SetWordWrap(v bool)
- func (t *TextObject) SetWysiwyg(v bool)
- func (t *TextObject) TabPositions() []float32
- func (t *TextObject) TabWidth() float32
- func (t *TextObject) TextColor() color.RGBA
- func (t *TextObject) TextOutline() style.TextOutline
- func (t *TextObject) TextRenderType() TextRenderType
- func (t *TextObject) Trimming() StringTrimming
- func (t *TextObject) Underlines() bool
- func (t *TextObject) VertAlign() VertAlign
- func (t *TextObject) WordWrap() bool
- func (t *TextObject) Wysiwyg() bool
- type TextObjectBase
- func (t *TextObjectBase) AllowExpressions() bool
- func (t *TextObjectBase) Brackets() string
- func (t *TextObjectBase) Deserialize(r report.Reader) error
- func (t *TextObjectBase) Duplicates() Duplicates
- func (t *TextObjectBase) Editable() bool
- func (t *TextObjectBase) Format() format.Format
- func (t *TextObjectBase) HideValue() string
- func (t *TextObjectBase) HideZeros() bool
- func (t *TextObjectBase) NullValue() string
- func (t *TextObjectBase) Padding() Padding
- func (t *TextObjectBase) ProcessAt() ProcessAt
- func (t *TextObjectBase) Serialize(w report.Writer) error
- func (t *TextObjectBase) SetAllowExpressions(v bool)
- func (t *TextObjectBase) SetBrackets(s string)
- func (t *TextObjectBase) SetDuplicates(d Duplicates)
- func (t *TextObjectBase) SetEditable(v bool)
- func (t *TextObjectBase) SetFormat(f format.Format)
- func (t *TextObjectBase) SetHideValue(s string)
- func (t *TextObjectBase) SetHideZeros(v bool)
- func (t *TextObjectBase) SetNullValue(s string)
- func (t *TextObjectBase) SetPadding(p Padding)
- func (t *TextObjectBase) SetProcessAt(p ProcessAt)
- func (t *TextObjectBase) SetText(s string)
- func (t *TextObjectBase) Text() string
- type TextRenderType
- type UncheckedSymbol
- type VertAlign
- type ZipCodeObject
- func (z *ZipCodeObject) Assign(src *ZipCodeObject)
- func (z *ZipCodeObject) DataColumn() string
- func (z *ZipCodeObject) Deserialize(r report.Reader) error
- func (z *ZipCodeObject) Expression() string
- func (z *ZipCodeObject) GetData(calc func(string) (any, error))
- func (z *ZipCodeObject) GetExpressions() []string
- func (z *ZipCodeObject) SegmentCount() int
- func (z *ZipCodeObject) SegmentHeight() float32
- func (z *ZipCodeObject) SegmentWidth() float32
- func (z *ZipCodeObject) Serialize(w report.Writer) error
- func (z *ZipCodeObject) SetDataColumn(v string)
- func (z *ZipCodeObject) SetExpression(v string)
- func (z *ZipCodeObject) SetSegmentCount(v int)
- func (z *ZipCodeObject) SetSegmentHeight(v float32)
- func (z *ZipCodeObject) SetSegmentWidth(v float32)
- func (z *ZipCodeObject) SetShowGrid(v bool)
- func (z *ZipCodeObject) SetShowMarkers(v bool)
- func (z *ZipCodeObject) SetSpacing(v float32)
- func (z *ZipCodeObject) SetText(v string)
- func (z *ZipCodeObject) ShowGrid() bool
- func (z *ZipCodeObject) ShowMarkers() bool
- func (z *ZipCodeObject) Spacing() float32
- func (z *ZipCodeObject) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeCap ¶
func SerializeCap(prefix string, w report.Writer, c, def CapSettings)
SerializeCap writes the three dot-qualified attributes for a cap property using the FRX format that C# CapSettings.Serialize(prefix, writer, diff) produces:
prefix.Width, prefix.Height, prefix.Style
Only attributes that differ from def are written (diff-encoding, same as C#).
Types ¶
type AdvMatrixCell ¶
type AdvMatrixCell struct {
Name string
Width float32
Height float32
ColSpan int
RowSpan int
Text string
HorzAlign int
VertAlign int
// Style fields parsed from FRX attributes.
Border *style.Border // nil = no border
FillColor *color.RGBA // nil = no fill
Font *style.Font // nil = inherit default
// Buttons contains any MatrixCollapseButton/MatrixSortButton children.
Buttons []*MatrixButton
}
AdvMatrixCell holds a single cell within a physical row of the AdvMatrix table.
func (*AdvMatrixCell) Deserialize ¶
func (cell *AdvMatrixCell) Deserialize(r report.Reader) error
Deserialize reads AdvMatrixCell properties.
type AdvMatrixColumn ¶
AdvMatrixColumn holds the physical column definition from the FRX layout.
func (*AdvMatrixColumn) Deserialize ¶
func (c *AdvMatrixColumn) Deserialize(r report.Reader) error
Deserialize reads AdvMatrixColumn properties.
type AdvMatrixDescriptor ¶
type AdvMatrixDescriptor struct {
// Expression is the data binding expression for this dimension.
Expression string
// DisplayText is the header text (may contain expressions).
DisplayText string
// Sort is the sort direction ("Ascending", "Descending", or "").
Sort string
// Children are nested descriptor levels.
Children []*AdvMatrixDescriptor
}
AdvMatrixDescriptor holds the definition of a row or column dimension in an AdvMatrixObject.
type AdvMatrixObject ¶
type AdvMatrixObject struct {
report.ReportComponentBase
// DataSource is the name of the bound data source.
DataSource string
// Columns holds the column dimension descriptors (pivot axes).
Columns []*AdvMatrixDescriptor
// Rows holds the row dimension descriptors (pivot axes).
Rows []*AdvMatrixDescriptor
// TableColumns holds the physical column width definitions from the FRX.
TableColumns []*AdvMatrixColumn
// TableRows holds the physical row definitions (with their cells) from the FRX.
TableRows []*AdvMatrixRow
}
AdvMatrixObject is an advanced pivot-matrix object that generates cross-tab reports with collapsible/sortable rows and columns.
It is the Go equivalent of FastReport.AdvMatrix.AdvMatrixObject. This implementation supports FRX loading (deserialization) and serialization for round-trip fidelity. The physical template cells (TableRows/TableColumns) are rendered by populateAdvMatrixCells in the report engine, with ColSpan, RowSpan, fill color, border, and font all resolved from the deserialized FRX.
func NewAdvMatrixObject ¶
func NewAdvMatrixObject() *AdvMatrixObject
NewAdvMatrixObject creates an AdvMatrixObject with defaults.
func (*AdvMatrixObject) BaseName ¶
func (a *AdvMatrixObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*AdvMatrixObject) Deserialize ¶
func (a *AdvMatrixObject) Deserialize(r report.Reader) error
Deserialize reads AdvMatrixObject properties from an FRX reader.
func (*AdvMatrixObject) DeserializeChild ¶
func (a *AdvMatrixObject) DeserializeChild(childType string, r report.Reader) bool
DeserializeChild handles child elements of AdvMatrixObject. It reads TableColumn/TableRow (with TableCell and button children), and dimension Columns/Rows descriptor blocks.
func (*AdvMatrixObject) Serialize ¶
func (a *AdvMatrixObject) Serialize(w report.Writer) error
Serialize writes AdvMatrixObject properties that differ from defaults.
func (*AdvMatrixObject) TypeName ¶
func (a *AdvMatrixObject) TypeName() string
TypeName returns "AdvMatrixObject".
type AdvMatrixRow ¶
type AdvMatrixRow struct {
Name string
Height float32
AutoSize bool
Cells []*AdvMatrixCell
}
AdvMatrixRow holds a physical row definition and its cells.
func (*AdvMatrixRow) Deserialize ¶
func (row *AdvMatrixRow) Deserialize(r report.Reader) error
Deserialize reads AdvMatrixRow properties (cells deserialized via DeserializeChild).
type AutoShrinkMode ¶
type AutoShrinkMode int
AutoShrinkMode controls the AutoShrink feature.
const ( AutoShrinkNone AutoShrinkMode = iota AutoShrinkFontSize AutoShrinkFontWidth AutoShrinkFitText )
type BarcodeObject ¶
type BarcodeObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
BarcodeObject is a report object that renders a barcode (1D or 2D). It is the Go equivalent of FastReport.BarcodeObject.
func NewBarcodeObject ¶
func NewBarcodeObject() *BarcodeObject
NewBarcodeObject creates a BarcodeObject with defaults (ShowText=true, AutoSize=true). Default Text is "12345678" (mirrors C# BarcodeObject constructor which calls Barcode.GetDefaultValue() on the default Barcode39 instance).
func (*BarcodeObject) AllowExpressions ¶
func (b *BarcodeObject) AllowExpressions() bool
AllowExpressions returns whether bracket expressions are evaluated in Text.
func (*BarcodeObject) AutoSize ¶
func (b *BarcodeObject) AutoSize() bool
AutoSize returns whether the object resizes to fit the barcode.
func (*BarcodeObject) BarcodeType ¶
func (b *BarcodeObject) BarcodeType() string
BarcodeType returns the symbology name (e.g. "QR Code", "Code128").
func (*BarcodeObject) DataColumn ¶
func (b *BarcodeObject) DataColumn() string
DataColumn returns the data source column that provides the barcode value.
func (*BarcodeObject) Deserialize ¶
func (b *BarcodeObject) Deserialize(r report.Reader) error
Deserialize reads BarcodeObject properties.
func (*BarcodeObject) Expression ¶
func (b *BarcodeObject) Expression() string
Expression returns the expression that evaluates to the barcode value.
func (*BarcodeObject) GetData ¶
func (b *BarcodeObject) GetData(calc func(string) (any, error))
GetData evaluates the DataColumn or Expression binding using the provided calc function and updates the Text value accordingly. Mirrors C# BarcodeObject.GetData / GetDataShared (BarcodeObject.cs line 593-627).
func (*BarcodeObject) GetExpressions ¶
func (b *BarcodeObject) GetExpressions() []string
GetExpressions returns the list of expressions used by this BarcodeObject for pre-compilation by the report engine. Mirrors C# BarcodeObject.GetExpressions (BarcodeObject.cs line 557-576).
func (*BarcodeObject) RestoreState ¶
func (b *BarcodeObject) RestoreState()
RestoreState restores the Text saved by SaveState. Mirrors C# BarcodeObject.RestoreState (BarcodeObject.cs line 586-590).
func (*BarcodeObject) SaveState ¶
func (b *BarcodeObject) SaveState()
SaveState saves the current Text so RestoreState can undo engine-pass changes. Mirrors C# BarcodeObject.SaveState (BarcodeObject.cs line 579-583).
func (*BarcodeObject) Serialize ¶
func (b *BarcodeObject) Serialize(w report.Writer) error
Serialize writes BarcodeObject properties that differ from defaults.
func (*BarcodeObject) SetAllowExpressions ¶
func (b *BarcodeObject) SetAllowExpressions(v bool)
SetAllowExpressions sets the AllowExpressions flag.
func (*BarcodeObject) SetAutoSize ¶
func (b *BarcodeObject) SetAutoSize(v bool)
SetAutoSize sets the AutoSize flag.
func (*BarcodeObject) SetBarcodeType ¶
func (b *BarcodeObject) SetBarcodeType(v string)
SetBarcodeType sets the symbology name.
func (*BarcodeObject) SetDataColumn ¶
func (b *BarcodeObject) SetDataColumn(s string)
SetDataColumn sets the data column binding.
func (*BarcodeObject) SetExpression ¶
func (b *BarcodeObject) SetExpression(s string)
SetExpression sets the barcode value expression.
func (*BarcodeObject) SetShowText ¶
func (b *BarcodeObject) SetShowText(v bool)
SetShowText sets the ShowText flag.
func (*BarcodeObject) SetText ¶
func (b *BarcodeObject) SetText(v string)
SetText sets the barcode data string.
func (*BarcodeObject) ShowText ¶
func (b *BarcodeObject) ShowText() bool
ShowText returns whether the human-readable text is displayed.
func (*BarcodeObject) Text ¶
func (b *BarcodeObject) Text() string
Text returns the barcode data string.
type CapSettings ¶
type CapSettings struct {
// Width of the cap in pixels (default 8).
Width float32
// Height of the cap in pixels (default 8).
Height float32
// Style of the cap (default None).
Style CapStyle
}
CapSettings defines the visual cap at one end of a line. It is the Go equivalent of FastReport.CapSettings (CapSettings.cs).
func DefaultCapSettings ¶
func DefaultCapSettings() CapSettings
DefaultCapSettings returns a CapSettings with default values matching the C# constructor: width=8, height=8, style=None.
func DeserializeCap ¶
func DeserializeCap(prefix string, r report.Reader, def CapSettings) CapSettings
DeserializeCap reads the dot-qualified cap attributes written by SerializeCap and returns the resulting CapSettings starting from def.
func (*CapSettings) Assign ¶
func (c *CapSettings) Assign(src CapSettings)
Assign copies all fields from src into c. Equivalent to C# CapSettings.Assign(CapSettings source).
func (CapSettings) Clone ¶
func (c CapSettings) Clone() CapSettings
Clone returns an independent copy of c. Equivalent to C# CapSettings.Clone().
func (CapSettings) Equals ¶
func (c CapSettings) Equals(other CapSettings) bool
Equals reports whether c and other have identical field values. Equivalent to C# CapSettings.Equals(object obj).
type CapStyle ¶
type CapStyle int
CapStyle specifies the style of a line end cap. It is the Go equivalent of FastReport.CapStyle. CapSettings.cs, FastReport.Base — enum order matches C# definition.
type CellularTextObject ¶
type CellularTextObject struct {
TextObject
// contains filtered or unexported fields
}
CellularTextObject renders text in a grid of fixed-size cells — one character per cell. It is the Go equivalent of FastReport.CellularTextObject.
It extends TextObject with cell-size and spacing controls. The engine renders it as a text object; the cellular grid visualization is handled at export time.
func NewCellularTextObject ¶
func NewCellularTextObject() *CellularTextObject
NewCellularTextObject creates a CellularTextObject with defaults.
The C# constructor (CellularTextObject.cs) explicitly sets:
- CanBreak = false (text cells must not split across pages)
- Border.Lines = BorderLines.All (all four cell borders visible by default)
WordWrap defaults to true (inherited from TextObject).
func (*CellularTextObject) BaseName ¶
func (c *CellularTextObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*CellularTextObject) CellHeight ¶
func (c *CellularTextObject) CellHeight() float32
CellHeight returns the character cell height in pixels (0 = auto).
func (*CellularTextObject) CellWidth ¶
func (c *CellularTextObject) CellWidth() float32
CellWidth returns the character cell width in pixels (0 = auto).
func (*CellularTextObject) Deserialize ¶
func (c *CellularTextObject) Deserialize(r report.Reader) error
Deserialize reads CellularTextObject properties.
func (*CellularTextObject) HorzSpacing ¶
func (c *CellularTextObject) HorzSpacing() float32
HorzSpacing returns the horizontal gap between cells in pixels.
func (*CellularTextObject) Serialize ¶
func (c *CellularTextObject) Serialize(w report.Writer) error
Serialize writes CellularTextObject properties that differ from defaults.
func (*CellularTextObject) SetCellHeight ¶
func (c *CellularTextObject) SetCellHeight(v float32)
SetCellHeight sets the character cell height.
func (*CellularTextObject) SetCellWidth ¶
func (c *CellularTextObject) SetCellWidth(v float32)
SetCellWidth sets the character cell width.
func (*CellularTextObject) SetHorzSpacing ¶
func (c *CellularTextObject) SetHorzSpacing(v float32)
SetHorzSpacing sets the horizontal cell gap.
func (*CellularTextObject) SetVertSpacing ¶
func (c *CellularTextObject) SetVertSpacing(v float32)
SetVertSpacing sets the vertical cell gap.
func (*CellularTextObject) SetWordWrap ¶
func (c *CellularTextObject) SetWordWrap(v bool)
SetWordWrap sets the word-wrap flag.
func (*CellularTextObject) TypeName ¶
func (c *CellularTextObject) TypeName() string
TypeName returns "CellularTextObject".
func (*CellularTextObject) VertSpacing ¶
func (c *CellularTextObject) VertSpacing() float32
VertSpacing returns the vertical gap between cells in pixels.
func (*CellularTextObject) WordWrap ¶
func (c *CellularTextObject) WordWrap() bool
WordWrap returns whether text wraps within the object bounds.
type CheckBoxObject ¶
type CheckBoxObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
CheckBoxObject displays a check box that can be bound to a boolean expression. It is the Go equivalent of FastReport.CheckBoxObject.
func NewCheckBoxObject ¶
func NewCheckBoxObject() *CheckBoxObject
NewCheckBoxObject creates a CheckBoxObject with defaults.
func (*CheckBoxObject) CheckColor ¶
func (c *CheckBoxObject) CheckColor() color.RGBA
CheckColor returns the colour used to draw the check symbol.
func (*CheckBoxObject) CheckWidthRatio ¶
func (c *CheckBoxObject) CheckWidthRatio() float32
CheckWidthRatio returns the width scaling factor for the check symbol.
func (*CheckBoxObject) Checked ¶
func (c *CheckBoxObject) Checked() bool
Checked returns whether the check box is in the checked state.
func (*CheckBoxObject) CheckedSymbol ¶
func (c *CheckBoxObject) CheckedSymbol() CheckedSymbol
CheckedSymbol returns the symbol used in the checked state.
func (*CheckBoxObject) DataColumn ¶
func (c *CheckBoxObject) DataColumn() string
DataColumn returns the data source column that provides the checked value.
func (*CheckBoxObject) Deserialize ¶
func (c *CheckBoxObject) Deserialize(r report.Reader) error
Deserialize reads CheckBoxObject properties.
func (*CheckBoxObject) Editable ¶
func (c *CheckBoxObject) Editable() bool
Editable returns whether the check box can be toggled in the viewer.
func (*CheckBoxObject) Expression ¶
func (c *CheckBoxObject) Expression() string
Expression returns the boolean expression that determines the checked state.
func (*CheckBoxObject) GetData ¶
func (c *CheckBoxObject) GetData(calc func(string) (any, error))
GetData evaluates the DataColumn or Expression binding using the provided calc function and updates the Checked state accordingly. Mirrors C# CheckBoxObject.GetData / GetDataShared (CheckBoxObject.cs line 340-361).
func (*CheckBoxObject) GetExpressions ¶
func (c *CheckBoxObject) GetExpressions() []string
GetExpressions returns the list of expressions used by this CheckBoxObject for pre-compilation by the report engine. Includes the base component expressions (VisibleExpression, PrintableExpression) plus DataColumn and Expression when set. Mirrors C# CheckBoxObject.GetExpressions (CheckBoxObject.cs line 327-337).
func (*CheckBoxObject) HideIfUnchecked ¶
func (c *CheckBoxObject) HideIfUnchecked() bool
HideIfUnchecked returns whether the object is hidden when unchecked.
func (*CheckBoxObject) Serialize ¶
func (c *CheckBoxObject) Serialize(w report.Writer) error
Serialize writes CheckBoxObject properties that differ from defaults.
func (*CheckBoxObject) SetCheckColor ¶
func (c *CheckBoxObject) SetCheckColor(col color.RGBA)
SetCheckColor sets the check colour.
func (*CheckBoxObject) SetCheckWidthRatio ¶
func (c *CheckBoxObject) SetCheckWidthRatio(v float32)
SetCheckWidthRatio sets the check width ratio.
func (*CheckBoxObject) SetChecked ¶
func (c *CheckBoxObject) SetChecked(v bool)
SetChecked sets the checked state.
func (*CheckBoxObject) SetCheckedSymbol ¶
func (c *CheckBoxObject) SetCheckedSymbol(s CheckedSymbol)
SetCheckedSymbol sets the checked symbol.
func (*CheckBoxObject) SetDataColumn ¶
func (c *CheckBoxObject) SetDataColumn(s string)
SetDataColumn sets the data column binding.
func (*CheckBoxObject) SetEditable ¶
func (c *CheckBoxObject) SetEditable(v bool)
SetEditable sets the editable flag.
func (*CheckBoxObject) SetExpression ¶
func (c *CheckBoxObject) SetExpression(s string)
SetExpression sets the boolean expression.
func (*CheckBoxObject) SetHideIfUnchecked ¶
func (c *CheckBoxObject) SetHideIfUnchecked(v bool)
SetHideIfUnchecked sets the hide-if-unchecked flag.
func (*CheckBoxObject) SetUncheckedSymbol ¶
func (c *CheckBoxObject) SetUncheckedSymbol(s UncheckedSymbol)
SetUncheckedSymbol sets the unchecked symbol.
func (*CheckBoxObject) UncheckedSymbol ¶
func (c *CheckBoxObject) UncheckedSymbol() UncheckedSymbol
UncheckedSymbol returns the symbol used in the unchecked state.
type CheckedSymbol ¶
type CheckedSymbol int
CheckedSymbol specifies the symbol drawn when a CheckBox is checked.
const ( CheckedSymbolCheck CheckedSymbol = iota CheckedSymbolCross CheckedSymbolPlus CheckedSymbolFill )
type ContainerObject ¶
type ContainerObject struct {
report.ReportComponentBase
OnBeforeLayout report.EventHandler
OnAfterLayout report.EventHandler
// contains filtered or unexported fields
}
ContainerObject is a layout container that holds child report objects. It is the Go equivalent of FastReport.ContainerObject.
func NewContainerObject ¶
func NewContainerObject() *ContainerObject
NewContainerObject creates a ContainerObject with defaults.
func (*ContainerObject) AddChild ¶
func (c *ContainerObject) AddChild(child report.Base)
AddChild adds a child object to the container.
func (*ContainerObject) AfterLayoutEvent ¶
func (c *ContainerObject) AfterLayoutEvent() string
AfterLayoutEvent returns the script event name fired after layout.
func (*ContainerObject) BeforeLayoutEvent ¶
func (c *ContainerObject) BeforeLayoutEvent() string
BeforeLayoutEvent returns the script event name fired before layout.
func (*ContainerObject) CanContain ¶
func (c *ContainerObject) CanContain(child report.Base) bool
CanContain returns true for any non-container child.
func (*ContainerObject) Deserialize ¶
func (c *ContainerObject) Deserialize(r report.Reader) error
Deserialize reads ContainerObject properties.
func (*ContainerObject) FireAfterLayout ¶
func (c *ContainerObject) FireAfterLayout()
FireAfterLayout fires the OnAfterLayout event if set.
func (*ContainerObject) FireBeforeLayout ¶
func (c *ContainerObject) FireBeforeLayout()
FireBeforeLayout fires the OnBeforeLayout event if set.
func (*ContainerObject) GetChildObjects ¶
func (c *ContainerObject) GetChildObjects(list *[]report.Base)
GetChildObjects fills list with all child objects.
func (*ContainerObject) GetChildOrder ¶
func (c *ContainerObject) GetChildOrder(child report.Base) int
GetChildOrder returns the z-order index of child.
func (*ContainerObject) Objects ¶
func (c *ContainerObject) Objects() *report.ObjectCollection
Objects returns the child object collection.
func (*ContainerObject) RemoveChild ¶
func (c *ContainerObject) RemoveChild(child report.Base)
RemoveChild removes a child object from the container.
func (*ContainerObject) Serialize ¶
func (c *ContainerObject) Serialize(w report.Writer) error
Serialize writes ContainerObject properties that differ from defaults.
func (*ContainerObject) SetAfterLayoutEvent ¶
func (c *ContainerObject) SetAfterLayoutEvent(s string)
SetAfterLayoutEvent sets the after-layout event name.
func (*ContainerObject) SetBeforeLayoutEvent ¶
func (c *ContainerObject) SetBeforeLayoutEvent(s string)
SetBeforeLayoutEvent sets the before-layout event name.
func (*ContainerObject) SetChildOrder ¶
func (c *ContainerObject) SetChildOrder(child report.Base, order int)
SetChildOrder moves child to the given z-order position.
func (*ContainerObject) UpdateLayout ¶
func (c *ContainerObject) UpdateLayout(dx, dy float32)
UpdateLayout adjusts child positions and sizes when the container grows or shrinks by (dx, dy). Each child is repositioned according to its Anchor and Dock properties, exactly mirroring C# ContainerObject.UpdateLayout (ContainerObject.cs lines 117-187).
type DigitalSignatureObject ¶
type DigitalSignatureObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
DigitalSignatureObject displays a digital signature placeholder. At print time it renders a signature field that can be signed digitally.
It is the Go equivalent of FastReport.DigitalSignature.DigitalSignatureObject. This stub supports FRX loading; actual signature rendering is not yet implemented.
func NewDigitalSignatureObject ¶
func NewDigitalSignatureObject() *DigitalSignatureObject
NewDigitalSignatureObject creates a DigitalSignatureObject with defaults.
func (*DigitalSignatureObject) BaseName ¶
func (d *DigitalSignatureObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*DigitalSignatureObject) Deserialize ¶
func (d *DigitalSignatureObject) Deserialize(r report.Reader) error
Deserialize reads DigitalSignatureObject properties from an FRX reader.
func (*DigitalSignatureObject) Placeholder ¶
func (d *DigitalSignatureObject) Placeholder() string
Placeholder returns the placeholder text.
func (*DigitalSignatureObject) Serialize ¶
func (d *DigitalSignatureObject) Serialize(w report.Writer) error
Serialize writes DigitalSignatureObject properties that differ from defaults.
func (*DigitalSignatureObject) SetPlaceholder ¶
func (d *DigitalSignatureObject) SetPlaceholder(v string)
SetPlaceholder sets the placeholder text.
func (*DigitalSignatureObject) TypeName ¶
func (d *DigitalSignatureObject) TypeName() string
TypeName returns "DigitalSignatureObject".
type Duplicates ¶
type Duplicates int
Duplicates specifies how duplicate values are displayed.
const ( // DuplicatesShow allows the text object to show duplicate values. DuplicatesShow Duplicates = iota // DuplicatesHide hides text objects with duplicate values. DuplicatesHide // DuplicatesClear shows the text object but with no text when the value is duplicate. DuplicatesClear // DuplicatesMerge merges multiple text objects with the same value into one. DuplicatesMerge )
type HorzAlign ¶
type HorzAlign int
HorzAlign specifies horizontal text alignment.
func ParseHorzAlign ¶
ParseHorzAlign parses a horizontal alignment value from an FRX attribute. FRX files may store alignment as a string name ("Left", "Center", "Right", "Justify") or as a numeric string ("0", "1", "2", "3").
type HtmlObject ¶
type HtmlObject struct {
TextObjectBase
// contains filtered or unexported fields
}
HtmlObject is a report component that renders its text content as HTML. It extends TextObjectBase and is the Go equivalent of FastReport.HtmlObject. During HTML export the text is emitted verbatim as raw HTML; other exporters strip HTML tags and render the underlying plain text.
func NewHtmlObject ¶
func NewHtmlObject() *HtmlObject
NewHtmlObject creates an HtmlObject with defaults.
func (*HtmlObject) ApplyCondition ¶
func (h *HtmlObject) ApplyCondition(c style.HighlightCondition)
ApplyCondition applies the visual overrides from a HighlightCondition. Fill (background colour), Border, and Visible flags are supported. Mirrors C# HtmlObject.ApplyCondition() (HtmlObject.cs lines 147-155).
func (*HtmlObject) Assign ¶
func (h *HtmlObject) Assign(src *HtmlObject)
Assign copies all HtmlObject fields from src. Mirrors C# HtmlObject.Assign(Base source) (HtmlObject.cs lines 80-86).
func (*HtmlObject) CalcWidth ¶
func (h *HtmlObject) CalcWidth() float32
CalcWidth returns the component's current width, matching the C# stub InternalCalcWidth() which simply returns this.Width. Mirrors C# HtmlObject.CalcWidth() (HtmlObject.cs lines 193-196).
func (*HtmlObject) Deserialize ¶
func (h *HtmlObject) Deserialize(r report.Reader) error
Deserialize reads HtmlObject properties.
func (*HtmlObject) GetExpressions ¶
func (h *HtmlObject) GetExpressions() []string
GetExpressions returns the list of expression strings embedded in the Text field (delimited by Brackets), merged with the base component expressions (VisibleExpression, PrintableExpression). Mirrors C# HtmlObject.GetExpressions() (HtmlObject.cs lines 161-172).
func (*HtmlObject) RestoreState ¶
func (h *HtmlObject) RestoreState()
RestoreState restores the component state and the saved Text value. Mirrors C# HtmlObject.RestoreState() (HtmlObject.cs lines 183-187).
func (*HtmlObject) RightToLeft ¶
func (h *HtmlObject) RightToLeft() bool
RightToLeft returns whether text is rendered right-to-left.
func (*HtmlObject) SaveState ¶
func (h *HtmlObject) SaveState()
SaveState saves the current component state (via the embedded base) and also captures the current Text value. Mirrors C# HtmlObject.SaveState() (HtmlObject.cs lines 177-180).
func (*HtmlObject) Serialize ¶
func (h *HtmlObject) Serialize(w report.Writer) error
Serialize writes HtmlObject properties that differ from defaults.
func (*HtmlObject) SetRightToLeft ¶
func (h *HtmlObject) SetRightToLeft(v bool)
SetRightToLeft sets the right-to-left flag.
type ImageAlign ¶
type ImageAlign int
ImageAlign controls fixed-position alignment of the image within the object.
const ( ImageAlignNone ImageAlign = iota ImageAlignTopLeft ImageAlignTopCenter ImageAlignTopRight ImageAlignCenterLeft ImageAlignCenterCenter ImageAlignCenterRight ImageAlignBottomLeft ImageAlignBottomCenter ImageAlignBottomRight )
type ImageFormat ¶
type ImageFormat int
ImageFormat identifies the encoded format of image bytes.
const ( ImageFormatUnknown ImageFormat = iota ImageFormatPng ImageFormatJpeg ImageFormatGif ImageFormatBmp ImageFormatTiff ImageFormatSvg )
type LineObject ¶
type LineObject struct {
report.ReportComponentBase
// StartCap is the cap drawn at the start of the line.
StartCap CapSettings
// EndCap is the cap drawn at the end of the line.
EndCap CapSettings
// contains filtered or unexported fields
}
LineObject represents a line that can be diagonal or axis-aligned. It is the Go equivalent of FastReport.LineObject.
func NewLineObject ¶
func NewLineObject() *LineObject
NewLineObject creates a LineObject with defaults.
func (*LineObject) Assign ¶
func (l *LineObject) Assign(src *LineObject)
Assign copies all LineObject properties from src. Mirrors C# LineObject.Assign (LineObject.cs:81-89).
func (*LineObject) DashPattern ¶
func (l *LineObject) DashPattern() []float32
DashPattern returns the custom dash pattern (nil = solid).
func (*LineObject) Deserialize ¶
func (l *LineObject) Deserialize(r report.Reader) error
Deserialize reads LineObject properties. Cap attributes are read as dot-qualified names matching the FRX format produced by C# CapSettings.Serialize() (e.g. StartCap.Style="Arrow"). DashPattern is read when present (LineObject.cs line 274).
func (*LineObject) Diagonal ¶
func (l *LineObject) Diagonal() bool
Diagonal returns whether the line is drawn diagonally.
func (*LineObject) Serialize ¶
func (l *LineObject) Serialize(w report.Writer) error
Serialize writes LineObject properties that differ from defaults. Follows LineObject.cs Serialize(): writes Diagonal, then delegates to CapSettings.Serialize("StartCap", …) and CapSettings.Serialize("EndCap", …) which produce dot-qualified attributes (e.g. StartCap.Style="Arrow"). Also writes DashPattern when non-empty (LineObject.cs line 274-275).
func (*LineObject) SetDashPattern ¶
func (l *LineObject) SetDashPattern(dp []float32)
SetDashPattern sets the dash pattern.
func (*LineObject) SetDiagonal ¶
func (l *LineObject) SetDiagonal(v bool)
SetDiagonal sets the diagonal flag.
type LineSpacingType ¶
type LineSpacingType int
LineSpacingType controls line-spacing calculation.
const ( LineSpacingSingle LineSpacingType = iota LineSpacingAtLeast LineSpacingExactly LineSpacingMultiple )
type MSChartObject ¶
type MSChartObject struct {
report.ReportComponentBase
// ChartData holds the base64-encoded chart configuration / image data.
ChartData string
// ChartType is the global chart type (e.g. "Bar", "Line", "Pie").
ChartType string
// DataSource is the name of the bound data source.
DataSource string
// Series is the ordered list of data series.
Series []*MSChartSeries
}
MSChartObject renders a Microsoft Chart (MSChart) visualisation. The chart data and series definitions are stored in ChartData (base64).
It is the Go equivalent of FastReport.MSChart.MSChartObject. This implementation supports FRX loading (deserialization) and serialization for round-trip fidelity; rendering is not yet implemented.
func NewMSChartObject ¶
func NewMSChartObject() *MSChartObject
NewMSChartObject creates an MSChartObject with default settings.
func (*MSChartObject) BaseName ¶
func (m *MSChartObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*MSChartObject) Deserialize ¶
func (m *MSChartObject) Deserialize(r report.Reader) error
Deserialize reads MSChartObject properties from an FRX reader.
func (*MSChartObject) DeserializeChild ¶
func (m *MSChartObject) DeserializeChild(childType string, r report.Reader) bool
DeserializeChild handles MSChartSeries child elements.
func (*MSChartObject) RenderToImage ¶
func (m *MSChartObject) RenderToImage(w, h int) image.Image
RenderToImage renders the MSChartObject as a raster image of the given size. If ChartData is set, all embedded series are decoded and rendered. If no ChartData is available but Series have static values, those are used. Returns nil if there is no data to render.
func (*MSChartObject) Serialize ¶
func (m *MSChartObject) Serialize(w report.Writer) error
Serialize writes MSChartObject properties that differ from defaults.
func (*MSChartObject) TypeName ¶
func (m *MSChartObject) TypeName() string
TypeName returns "MSChartObject".
type MSChartSeries ¶
type MSChartSeries struct {
report.ReportComponentBase
// ChartType is the series-level chart type override (e.g. "Line", "Bar", "Pie").
// Empty string means inherit from the parent MSChartObject.
ChartType string
// Color is the series fill/line color.
Color color.RGBA
// ValuesSource is the data field expression bound to the Y-axis values.
ValuesSource string
// ArgumentSource is the data field expression bound to the X-axis / category.
ArgumentSource string
// LegendText is the label shown for this series in the chart legend.
LegendText string
}
MSChartSeries represents one data series inside an MSChartObject. It stores data binding and visual properties preserved for round-trip FRX fidelity.
func NewMSChartSeries ¶
func NewMSChartSeries() *MSChartSeries
NewMSChartSeries creates an MSChartSeries with defaults.
func (*MSChartSeries) BaseName ¶
func (s *MSChartSeries) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*MSChartSeries) Deserialize ¶
func (s *MSChartSeries) Deserialize(r report.Reader) error
Deserialize reads MSChartSeries properties.
func (*MSChartSeries) Serialize ¶
func (s *MSChartSeries) Serialize(w report.Writer) error
Serialize writes MSChartSeries properties that differ from defaults.
func (*MSChartSeries) TypeName ¶
func (s *MSChartSeries) TypeName() string
TypeName returns "MSChartSeries".
type MapLayer ¶
type MapLayer struct {
report.ReportComponentBase
// Shapefile is the name of the shapefile resource for this layer.
Shapefile string
// Type is the layer type ("Choropleth", "Bubble", etc.).
Type string
// DataSource is the bound data source name.
DataSource string
// Filter is an expression used to filter rows from the data source.
Filter string
// SpatialColumn is the data column containing geographic identifiers.
SpatialColumn string
// SpatialValue is an expression evaluating to the geographic identifier.
SpatialValue string
// AnalyticalValue is an expression evaluating to the data value for coloring/sizing.
AnalyticalValue string
// LabelColumn is the data column used for map labels.
LabelColumn string
// BoxAsString is the bounding-box serialization used by the map designer.
BoxAsString string
// Palette is the color-palette name applied to this layer.
Palette string
}
MapLayer represents a single data layer within a MapObject. Each layer binds geographic shapes (from a Shapefile) to a data source, applying color or size ranges to visualize analytical values.
func (*MapLayer) Deserialize ¶
Deserialize reads MapLayer properties from an FRX reader.
type MapObject ¶
type MapObject struct {
report.ReportComponentBase
// Layers holds the ordered list of map layers.
Layers []*MapLayer
// OffsetX is the horizontal pan offset.
OffsetX float32
// OffsetY is the vertical pan offset.
OffsetY float32
}
MapObject renders a geographic map visualization. It contains one or more MapLayer objects that bind data to geographic shapes.
It is the Go equivalent of FastReport.Map.MapObject. This stub supports FRX loading; actual map rendering is not yet implemented.
func (*MapObject) Deserialize ¶
Deserialize reads MapObject properties from an FRX reader.
func (*MapObject) DeserializeChild ¶
DeserializeChild handles MapLayer child elements.
type MatrixButton ¶
type MatrixButton struct {
// TypeName is "MatrixCollapseButton" or "MatrixSortButton".
TypeName string
Name string
Left float32
Width float32
Height float32
Dock string
SymbolSize float32
Symbol string
ShowCollapseExpandMenu bool
}
MatrixButton holds the minimal properties of a MatrixCollapseButton or MatrixSortButton embedded in a TableCell.
func (*MatrixButton) Deserialize ¶
func (btn *MatrixButton) Deserialize(r report.Reader) error
Deserialize reads MatrixButton properties.
type Padding ¶
type Padding struct {
Left, Top, Right, Bottom float32
}
Padding holds interior spacing (left, top, right, bottom) in pixels.
type ParagraphFormat ¶
type ParagraphFormat struct {
FirstLineIndent float32
LineSpacing float32
LineSpacingType LineSpacingType
SkipFirstLineIndent bool
}
ParagraphFormat holds paragraph-level formatting.
type PathPoint ¶
type PathPoint struct {
X, Y float32
Type PathPointType
}
PathPoint is one point in a vector path together with its segment type. Equivalent to GDI+ GraphicsPath element (PointF + PathPointType).
type PathPointType ¶
type PathPointType byte
PathPointType identifies how a path segment point is connected. Mirrors GDI+ PathPointType enum used in C# GraphicsPath.
const ( // PathPointTypeStart marks the beginning of a subpath. PathPointTypeStart PathPointType = 0 // PathPointTypeLine marks a line-to endpoint. PathPointTypeLine PathPointType = 1 // PathPointTypeBezier marks a cubic bezier control point or endpoint. PathPointTypeBezier PathPointType = 3 )
type PictureObject ¶
type PictureObject struct {
PictureObjectBase
// contains filtered or unexported fields
}
PictureObject displays a raster or vector image. It is the Go equivalent of FastReport.PictureObject.
func NewPictureObject ¶
func NewPictureObject() *PictureObject
NewPictureObject creates a PictureObject with defaults.
func (*PictureObject) Deserialize ¶
func (p *PictureObject) Deserialize(r report.Reader) error
Deserialize reads PictureObject properties.
func (*PictureObject) HasImage ¶
func (p *PictureObject) HasImage() bool
HasImage reports whether any image data or location is set.
func (*PictureObject) ImageData ¶
func (p *PictureObject) ImageData() []byte
ImageData returns the raw encoded image bytes (nil if none loaded).
func (*PictureObject) ImageFormat ¶
func (p *PictureObject) ImageFormat() ImageFormat
ImageFormat returns the format of the stored image bytes.
func (*PictureObject) Serialize ¶
func (p *PictureObject) Serialize(w report.Writer) error
Serialize writes PictureObject properties that differ from defaults.
func (*PictureObject) SetImageData ¶
func (p *PictureObject) SetImageData(data []byte)
SetImageData sets the raw image bytes and resets the format to Unknown.
func (*PictureObject) SetImageDataWithFormat ¶
func (p *PictureObject) SetImageDataWithFormat(data []byte, fmt ImageFormat)
SetImageDataWithFormat sets raw image bytes and their known format.
func (*PictureObject) SetTransparency ¶
func (p *PictureObject) SetTransparency(v float32)
SetTransparency sets the transparency (0.0–1.0).
func (*PictureObject) Tile ¶
func (p *PictureObject) Tile() bool
Tile returns whether the image is tiled across the object bounds.
func (*PictureObject) Transparency ¶
func (p *PictureObject) Transparency() float32
Transparency returns the global transparency (0.0 = fully opaque).
type PictureObjectBase ¶
type PictureObjectBase struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
PictureObjectBase is the base for image-displaying report objects. It is the Go equivalent of FastReport.PictureObjectBase.
func NewPictureObjectBase ¶
func NewPictureObjectBase() *PictureObjectBase
NewPictureObjectBase creates a PictureObjectBase with defaults.
func (*PictureObjectBase) Angle ¶
func (p *PictureObjectBase) Angle() int
Angle returns the rotation angle in degrees.
func (*PictureObjectBase) DataColumn ¶
func (p *PictureObjectBase) DataColumn() string
DataColumn returns the data source column that provides the image bytes.
func (*PictureObjectBase) Deserialize ¶
func (p *PictureObjectBase) Deserialize(r report.Reader) error
Deserialize reads PictureObjectBase properties.
func (*PictureObjectBase) GetData ¶
func (p *PictureObjectBase) GetData(calc func(string) (any, error))
GetData evaluates the DataColumn or ImageSourceExpression binding using the provided calc function. When DataColumn is set, the evaluated string is stored as the new ImageLocation. When ImageSourceExpression is set, the expression is evaluated and stored as DataColumn if it is a column reference, or as ImageLocation otherwise. Mirrors C# PictureObjectBase behaviour: DataColumn → GetColumnValue → image bytes; ImageSourceExpression → Calc → resolve as DataColumn or path.
func (*PictureObjectBase) GetExpressions ¶
func (p *PictureObjectBase) GetExpressions() []string
GetExpressions returns the list of expressions used by this PictureObjectBase for pre-compilation by the report engine. Mirrors C# PictureObjectBase.GetExpressions (PictureObjectBase.cs line 875-894).
func (*PictureObjectBase) Grayscale ¶
func (p *PictureObjectBase) Grayscale() bool
Grayscale returns whether the image is rendered in grayscale.
func (*PictureObjectBase) ImageAlign ¶
func (p *PictureObjectBase) ImageAlign() ImageAlign
ImageAlign returns the fixed-position alignment of the image.
func (*PictureObjectBase) ImageLocation ¶
func (p *PictureObjectBase) ImageLocation() string
ImageLocation returns a URL or file path for the image.
func (*PictureObjectBase) ImageSourceExpression ¶
func (p *PictureObjectBase) ImageSourceExpression() string
ImageSourceExpression returns an expression that evaluates to an image path/URL.
func (*PictureObjectBase) MaxHeight ¶
func (p *PictureObjectBase) MaxHeight() float32
MaxHeight returns the maximum display height in pixels (0 = no limit).
func (*PictureObjectBase) MaxWidth ¶
func (p *PictureObjectBase) MaxWidth() float32
MaxWidth returns the maximum display width in pixels (0 = no limit).
func (*PictureObjectBase) Padding ¶
func (p *PictureObjectBase) Padding() Padding
Padding returns interior padding around the image.
func (*PictureObjectBase) RestoreState ¶
func (p *PictureObjectBase) RestoreState()
RestoreState restores the SizeMode saved by SaveState. Mirrors C# PictureObjectBase.RestoreState (PictureObjectBase.cs line 722-727).
func (*PictureObjectBase) SaveState ¶
func (p *PictureObjectBase) SaveState()
SaveState saves the current SizeMode (in addition to the ReportComponentBase state) so RestoreState can undo engine-pass changes. Mirrors C# PictureObjectBase.SaveState (PictureObjectBase.cs line 748-752).
func (*PictureObjectBase) Serialize ¶
func (p *PictureObjectBase) Serialize(w report.Writer) error
Serialize writes PictureObjectBase properties that differ from defaults.
func (*PictureObjectBase) SetAngle ¶
func (p *PictureObjectBase) SetAngle(a int)
SetAngle sets the rotation angle.
func (*PictureObjectBase) SetDataColumn ¶
func (p *PictureObjectBase) SetDataColumn(s string)
SetDataColumn sets the data column binding.
func (*PictureObjectBase) SetGrayscale ¶
func (p *PictureObjectBase) SetGrayscale(v bool)
SetGrayscale sets grayscale rendering.
func (*PictureObjectBase) SetImageAlign ¶
func (p *PictureObjectBase) SetImageAlign(a ImageAlign)
SetImageAlign sets the image alignment.
func (*PictureObjectBase) SetImageLocation ¶
func (p *PictureObjectBase) SetImageLocation(s string)
SetImageLocation sets the image URL or file path.
func (*PictureObjectBase) SetImageSourceExpression ¶
func (p *PictureObjectBase) SetImageSourceExpression(s string)
SetImageSourceExpression sets the image-source expression.
func (*PictureObjectBase) SetMaxHeight ¶
func (p *PictureObjectBase) SetMaxHeight(v float32)
SetMaxHeight sets the maximum height.
func (*PictureObjectBase) SetMaxWidth ¶
func (p *PictureObjectBase) SetMaxWidth(v float32)
SetMaxWidth sets the maximum width.
func (*PictureObjectBase) SetPadding ¶
func (p *PictureObjectBase) SetPadding(pd Padding)
SetPadding sets the interior padding.
func (*PictureObjectBase) SetShowErrorImage ¶
func (p *PictureObjectBase) SetShowErrorImage(v bool)
SetShowErrorImage sets the show-error-image flag.
func (*PictureObjectBase) SetSizeMode ¶
func (p *PictureObjectBase) SetSizeMode(m SizeMode)
SetSizeMode sets the size mode.
func (*PictureObjectBase) ShowErrorImage ¶
func (p *PictureObjectBase) ShowErrorImage() bool
ShowErrorImage returns whether a placeholder is shown when the image fails to load.
func (*PictureObjectBase) SizeMode ¶
func (p *PictureObjectBase) SizeMode() SizeMode
SizeMode returns how the image is scaled.
type PolyLineObject ¶
type PolyLineObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
PolyLineObject draws a polyline (open polygon) that may use bezier curves. It is the Go equivalent of FastReport.PolyLineObject.
func NewPolyLineObject ¶
func NewPolyLineObject() *PolyLineObject
NewPolyLineObject creates a PolyLineObject with defaults.
func (*PolyLineObject) Assign ¶
func (p *PolyLineObject) Assign(src *PolyLineObject)
Assign copies all PolyLineObject properties from src. Points are deep-cloned so both objects remain independent. Mirrors C# PolyLineObject.Assign (PolyLineObject.cs lines 138-148).
func (*PolyLineObject) CenterX ¶
func (p *PolyLineObject) CenterX() float32
CenterX returns the local x origin.
func (*PolyLineObject) CenterY ¶
func (p *PolyLineObject) CenterY() float32
CenterY returns the local y origin.
func (*PolyLineObject) DashPattern ¶
func (p *PolyLineObject) DashPattern() []float32
DashPattern returns the dash pattern (nil = solid).
func (*PolyLineObject) Deserialize ¶
func (p *PolyLineObject) Deserialize(r report.Reader) error
Deserialize reads PolyLineObject properties. Handles both legacy PolyPoints format ("X\Y\type" separated by "|") and the current PolyPoints_v2 format ("X/Y[/L/…][/R/…]" separated by "|"). Also reads CenterX, CenterY, and DashPattern. Matches C# PolyLineObject.Deserialize() (PolyLineObject.cs lines 151-184).
func (*PolyLineObject) GetPath ¶
func (p *PolyLineObject) GetPath(left, top, right, bottom, scaleX, scaleY float32) []PathPoint
GetPath generates the bezier path for the polyline. Returns a slice of PathPoints (Type 0=start, 1=line, 3=bezier control/endpoint). Mirrors C# PolyLineObject.GetPath (PolyLineObject.cs lines 223-297).
func (*PolyLineObject) Points ¶
func (p *PolyLineObject) Points() *PolyPointCollection
Points returns the vertex collection.
func (*PolyLineObject) RecalculateBounds ¶
func (p *PolyLineObject) RecalculateBounds()
RecalculateBounds updates the object's bounds to tightly contain all points. Mirrors C# PolyLineObject.RecalculateBounds (PolyLineObject.cs line 302).
func (*PolyLineObject) Serialize ¶
func (p *PolyLineObject) Serialize(w report.Writer) error
Serialize writes PolyLineObject properties. Matches C# PolyLineObject.Serialize(): writes PolyPoints_v2, CenterX, CenterY, and DashPattern when non-empty (PolyLineObject.cs lines 496-517).
func (*PolyLineObject) SetCenterX ¶
func (p *PolyLineObject) SetCenterX(v float32)
SetCenterX sets the local x origin.
func (*PolyLineObject) SetCenterY ¶
func (p *PolyLineObject) SetCenterY(v float32)
SetCenterY sets the local y origin.
func (*PolyLineObject) SetDashPattern ¶
func (p *PolyLineObject) SetDashPattern(dp []float32)
SetDashPattern sets the dash pattern.
func (*PolyLineObject) SetPolyLine ¶
func (p *PolyLineObject) SetPolyLine(newPoints [][2]float32)
SetPolyLine replaces all points with plain X/Y pairs (no bezier control points) and recalculates bounds. Mirrors C# PolyLineObject.SetPolyLine(PointF[]) (PolyLineObject.cs line 519).
type PolyPoint ¶
type PolyPoint struct {
// X, Y are the point coordinates in pixels.
X, Y float32
// Left and Right are optional bezier control points (nil = straight segment).
Left, Right *PolyPoint
}
PolyPoint is a point on a poly-line or polygon with optional bezier control points.
type PolyPointCollection ¶
type PolyPointCollection struct {
// contains filtered or unexported fields
}
PolyPointCollection holds an ordered list of PolyPoints.
func (*PolyPointCollection) Add ¶
func (c *PolyPointCollection) Add(p *PolyPoint)
Add appends a point.
func (*PolyPointCollection) Clone ¶
func (c *PolyPointCollection) Clone() *PolyPointCollection
Clone returns a deep copy of the collection. Mirrors C# pointsCollection.Clone() (PolyLineObject.cs line 144).
func (*PolyPointCollection) Get ¶
func (c *PolyPointCollection) Get(i int) *PolyPoint
Get returns the point at index i.
func (*PolyPointCollection) Insert ¶
func (c *PolyPointCollection) Insert(index int, p *PolyPoint)
Insert inserts point p at the given index, pushing existing points right. If index >= Len() the point is appended. Mirrors C# PolyPointCollection.Insert (PolyLineObject.cs).
func (*PolyPointCollection) Len ¶
func (c *PolyPointCollection) Len() int
Len returns the number of points.
func (*PolyPointCollection) Remove ¶
func (c *PolyPointCollection) Remove(index int)
Remove removes the point at the given index. No-op when index is out of range. Mirrors C# PolyPointCollection.Remove (PolyLineObject.cs).
type PolygonObject ¶
type PolygonObject struct {
PolyLineObject
}
PolygonObject is a closed polyline (polygon) with an optional fill. It is the Go equivalent of FastReport.PolygonObject.
func NewPolygonObject ¶
func NewPolygonObject() *PolygonObject
NewPolygonObject creates a PolygonObject with defaults. C# PolygonObject() sets FlagUseFill = true (PolygonObject.cs:88), meaning it participates in fill serialization. In Go, fill is always available via ReportComponentBase.Fill — no separate flag is needed.
func (*PolygonObject) Assign ¶
func (pg *PolygonObject) Assign(src *PolygonObject)
Assign copies all PolygonObject properties from src.
func (*PolygonObject) Deserialize ¶
func (pg *PolygonObject) Deserialize(r report.Reader) error
Deserialize reads PolygonObject properties. Delegates entirely to PolyLineObject.Deserialize; PolygonObject has no additional serialized fields.
func (*PolygonObject) GetPath ¶
func (pg *PolygonObject) GetPath(left, top, right, bottom, scaleX, scaleY float32) []PathPoint
GetPath generates the closed bezier path for the polygon, connecting the last point back to the first. Mirrors C# PolyLineObject.GetPath with `this is PolygonObject` active (PolyLineObject.cs lines 249-253).
func (*PolygonObject) RecalculateBounds ¶
func (pg *PolygonObject) RecalculateBounds()
RecalculateBounds updates the polygon's bounds including the closing segment. Mirrors C# PolyLineObject.RecalculateBounds with `this is PolygonObject` active (PolyLineObject.cs lines 328-330).
func (*PolygonObject) Serialize ¶
func (pg *PolygonObject) Serialize(w report.Writer) error
Serialize writes PolygonObject properties. C# PolygonObject.Serialize() (PolygonObject.cs:73-78) only sets Border.SimpleBorder = true and calls base.Serialize(), which handles PolyPoints_v2, CenterX, CenterY, and DashPattern.
func (*PolygonObject) SetPolyLine ¶
func (pg *PolygonObject) SetPolyLine(newPoints [][2]float32)
SetPolyLine replaces all points and recalculates closed polygon bounds.
type ProcessAt ¶
type ProcessAt int
ProcessAt specifies when the report engine processes a text object.
const ( // ProcessAtDefault processes just-in-time (default). ProcessAtDefault ProcessAt = iota // ProcessAtReportFinished processes when the entire report is finished. ProcessAtReportFinished // ProcessAtReportPageFinished processes when the entire report page is finished. ProcessAtReportPageFinished // ProcessAtPageFinished processes when any report page is finished. ProcessAtPageFinished // ProcessAtColumnFinished processes when the column is finished. ProcessAtColumnFinished // ProcessAtDataFinished processes when the data block is finished. ProcessAtDataFinished // ProcessAtGroupFinished processes when the group is finished. ProcessAtGroupFinished // ProcessAtCustom processes manually via Engine.ProcessObject. ProcessAtCustom )
type RFIDBank ¶
type RFIDBank struct {
// Data is the static data value written to this bank.
Data string
// DataColumn is the bound data-source column name (overrides Data if set).
DataColumn string
// Offset is the offset within the bank to start writing (measured in 16-bit blocks).
// C# RFIDBank.Offset
Offset int
// DataFormat controls the encoding of Data/DataColumn.
DataFormat RFIDBankFormat
}
RFIDBank represents one RFID memory bank (EPC, TID, or User). The Go equivalent of FastReport.RFIDLabel.RFIDBank (RFIDLabel.cs:540-639).
type RFIDBankFormat ¶
type RFIDBankFormat int
RFIDBankFormat specifies how RFID bank data is encoded. C# RFIDLabel.RFIDBank.Format (RFIDLabel.cs:551-554)
const ( // RFIDBankFormatHex encodes data as hexadecimal ('H'). RFIDBankFormatHex RFIDBankFormat = iota // RFIDBankFormatASCII encodes data as ASCII text ('A'). RFIDBankFormatASCII // RFIDBankFormatDecimal encodes data as decimal ('D'). // C# RFIDLabel.RFIDBank.Format (RFIDLabel.cs:554) RFIDBankFormatDecimal )
type RFIDErrorHandle ¶
type RFIDErrorHandle int
RFIDErrorHandle controls behaviour when an RFID write fails during printing. C# RFIDLabel.EErrorHandle (RFIDLabel.cs:44-60)
const ( // RFIDErrorHandleSkip skips the failed label and continues printing ('N' = None). RFIDErrorHandleSkip RFIDErrorHandle = iota // RFIDErrorHandlePause pauses the printer after a failed write ('P'). RFIDErrorHandlePause // RFIDErrorHandleError places the printer in error mode ('E'). RFIDErrorHandleError )
type RFIDLabel ¶
type RFIDLabel struct {
report.ReportComponentBase
// EPCBank is the Electronic Product Code memory bank.
EPCBank RFIDBank
// TIDBank is the Tag Identifier (read-only) bank — not usually written.
TIDBank RFIDBank
// UserBank is the User memory bank.
UserBank RFIDBank
// EpcFormat defines the EPC bit-field layout (default "96,8,3,3,20,24,38").
// C# RFIDLabel.EpcFormat (RFIDLabel.cs:153-164)
EpcFormat string
// AccessPassword is the password required to access protected banks (default "00000000").
AccessPassword string
// AccessPasswordDataColumn binds AccessPassword to a data-source column.
AccessPasswordDataColumn string
// KillPassword is the password to permanently disable the tag (default "00000000").
KillPassword string
// KillPasswordDataColumn binds KillPassword to a data-source column.
KillPasswordDataColumn string
// Lock settings per bank.
// C# defaults: all Open (= PermanentUnlock), RFIDLabel.cs:522-525
LockKillPassword RFIDLockType
LockAccessPassword RFIDLockType
LockEPCBank RFIDLockType
LockUserBank RFIDLockType
// StartPermaLock is the start section for permanent lock of user bank.
// C# RFIDLabel.StartPermaLock (RFIDLabel.cs:289-299)
StartPermaLock int
// CountPermaLock is the count of sections for permanent lock of user bank.
// C# RFIDLabel.CountPermaLock (RFIDLabel.cs:301-313)
CountPermaLock int
// AdaptiveAntenna enables the adaptive antenna property.
// C# RFIDLabel.AdaptiveAntenna (RFIDLabel.cs:398-402)
AdaptiveAntenna bool
// ReadPower is the read power level for the label (default 16).
// C# RFIDLabel.ReadPower (RFIDLabel.cs:319-329)
ReadPower int16
// WritePower is the write power level for the label (default 16).
// C# RFIDLabel.WritePower (RFIDLabel.cs:331-344)
WritePower int16
// UseAdjustForEPC enables EPC length auto-adjustment.
// Setting this true clears RewriteEPCBank (C# RFIDLabel.cs:358-361).
UseAdjustForEPC bool
// RewriteEPCBank controls whether the entire EPC bank is overwritten on each print.
// Setting this true clears UseAdjustForEPC (C# RFIDLabel.cs:373-377).
RewriteEPCBank bool
// ErrorHandle determines printer behaviour on write failure.
ErrorHandle RFIDErrorHandle
}
RFIDLabel is a report object that encodes data into an RFID tag. It acts as a container (like ContainerObject) and is the Go equivalent of FastReport.RFIDLabel (RFIDLabel.cs:13-640).
During rendering, it produces a placeholder band with its name and encoded values for visualization; actual RFID encoding is performed by the printer driver at print time.
func NewRFIDLabel ¶
func NewRFIDLabel() *RFIDLabel
NewRFIDLabel creates an RFIDLabel with C#-matching defaults. C# RFIDLabel constructor (RFIDLabel.cs:512-535)
func (*RFIDLabel) Assign ¶
Assign copies the contents of another RFIDLabel into this one. C# RFIDLabel.Assign (RFIDLabel.cs:430-454)
func (*RFIDLabel) Deserialize ¶
Deserialize reads RFIDLabel properties. C# attribute names mirror those written in Serialize above.
func (*RFIDLabel) PlaceholderText ¶
PlaceholderText returns a human-readable text describing the RFID tag configuration. Used by exporters to render a visual placeholder.
func (*RFIDLabel) Serialize ¶
Serialize writes RFIDLabel properties that differ from defaults. C# RFIDLabel.Serialize (RFIDLabel.cs:457-501)
func (*RFIDLabel) SetRewriteEPCBank ¶
SetRewriteEPCBank sets RewriteEPCBank; when set to true it clears UseAdjustForEPC. C# RFIDLabel.RewriteEPCbank setter (RFIDLabel.cs:372-377)
func (*RFIDLabel) SetUseAdjustForEPC ¶
SetUseAdjustForEPC sets UseAdjustForEPC; when set to true it clears RewriteEPCBank. C# RFIDLabel.UseAdjustForEPC setter (RFIDLabel.cs:356-361)
type RFIDLockType ¶
type RFIDLockType int
RFIDLockType specifies how an RFID bank is locked after writing. C# RFIDLabel.LockType (RFIDLabel.cs:18-39)
const ( // RFIDLockTypeUnlock leaves the bank unlocked ('U'). RFIDLockTypeUnlock RFIDLockType = iota // RFIDLockTypeLock locks the bank after writing ('L'). RFIDLockTypeLock // RFIDLockTypePermanentUnlock permanently unlocks the bank ('O' = Open). RFIDLockTypePermanentUnlock // RFIDLockTypePermanentLock permanently locks the bank ('P' = Protect). RFIDLockTypePermanentLock )
type RichObject ¶
type RichObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
RichObject renders Rich Text Format (RTF) content. The RTF text may contain bracket-expressions like [DataSource.Field] that are evaluated at report generation time.
It is the Go equivalent of FastReport.RichObject.
func NewRichObject ¶
func NewRichObject() *RichObject
NewRichObject creates a RichObject with default settings.
func (*RichObject) BaseName ¶
func (r *RichObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*RichObject) CanGrow ¶
func (r *RichObject) CanGrow() bool
CanGrow reports whether the object may grow vertically.
func (*RichObject) Deserialize ¶
func (r *RichObject) Deserialize(rd report.Reader) error
Deserialize reads RichObject properties from an FRX reader.
func (*RichObject) Serialize ¶
func (r *RichObject) Serialize(w report.Writer) error
Serialize writes RichObject properties that differ from defaults.
func (*RichObject) SetCanGrow ¶
func (r *RichObject) SetCanGrow(v bool)
SetCanGrow sets whether the object may grow vertically.
type SVGObject ¶
type SVGObject struct {
report.ReportComponentBase
// SvgData holds the base64-encoded SVG XML.
SvgData string
}
SVGObject renders a scalable vector graphic. The SVG content is stored as a base64-encoded string in SvgData, matching the FastReport .NET SVGObject (FastReport.SVGObject).
func (*SVGObject) Deserialize ¶
Deserialize reads SVGObject properties from an FRX reader.
type ShapeKind ¶
type ShapeKind int
ShapeKind identifies the geometric shape drawn by a ShapeObject.
const ( // ShapeKindRectangle draws a rectangle. ShapeKindRectangle ShapeKind = iota // ShapeKindRoundRectangle draws a round-cornered rectangle. ShapeKindRoundRectangle // ShapeKindEllipse draws an ellipse. ShapeKindEllipse // ShapeKindTriangle draws a triangle. ShapeKindTriangle // ShapeKindDiamond draws a diamond. ShapeKindDiamond )
type ShapeObject ¶
type ShapeObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
ShapeObject draws a geometric shape (rectangle, ellipse, etc.). It is the Go equivalent of FastReport.ShapeObject.
func NewShapeObject ¶
func NewShapeObject() *ShapeObject
NewShapeObject creates a ShapeObject with defaults.
func (*ShapeObject) Assign ¶
func (s *ShapeObject) Assign(src *ShapeObject)
Assign copies all ShapeObject properties from src. Mirrors C# ShapeObject.Assign (ShapeObject.cs lines 115-123).
func (*ShapeObject) Curve ¶
func (s *ShapeObject) Curve() float32
Curve returns the corner radius for RoundRectangle shapes.
func (*ShapeObject) DashPattern ¶
func (s *ShapeObject) DashPattern() []float32
DashPattern returns the dash pattern (nil = solid).
func (*ShapeObject) Deserialize ¶
func (s *ShapeObject) Deserialize(r report.Reader) error
Deserialize reads ShapeObject properties. Mirrors C# ShapeObject.Deserialize (reads Shape, Curve, DashPattern).
func (*ShapeObject) Serialize ¶
func (s *ShapeObject) Serialize(w report.Writer) error
Serialize writes ShapeObject properties that differ from defaults. Mirrors C# ShapeObject.Serialize (ShapeObject.cs lines 204-215).
func (*ShapeObject) SetCurve ¶
func (s *ShapeObject) SetCurve(v float32)
SetCurve sets the corner radius.
func (*ShapeObject) SetDashPattern ¶
func (s *ShapeObject) SetDashPattern(dp []float32)
SetDashPattern sets the dash pattern.
func (*ShapeObject) SetShape ¶
func (s *ShapeObject) SetShape(k ShapeKind)
SetShape sets the geometric shape.
func (*ShapeObject) Shape ¶
func (s *ShapeObject) Shape() ShapeKind
Shape returns the geometric shape kind.
type SizeMode ¶
type SizeMode int
SizeMode controls how an image is scaled within a PictureObject. It mirrors System.Windows.Forms.PictureBoxSizeMode.
const ( // SizeModeNormal displays the image at its original size, clipped if needed. SizeModeNormal SizeMode = iota // SizeModeStretchImage stretches the image to fill the object bounds. SizeModeStretchImage // SizeModeAutoSize resizes the object to fit the image. SizeModeAutoSize // SizeModeCenterImage centres the image without scaling. SizeModeCenterImage // SizeModeZoom scales the image proportionally to fit within bounds (default). SizeModeZoom )
type SparklineObject ¶
type SparklineObject struct {
report.ReportComponentBase
// ChartData holds the base64-encoded chart XML.
ChartData string
// Dock specifies the docking style within the parent band.
Dock string
}
SparklineObject renders a small chart (sparkline) embedded in a band. The chart definition is stored as a base64-encoded XML string in ChartData.
It is the Go equivalent of FastReport.SparklineObject.
func NewSparklineObject ¶
func NewSparklineObject() *SparklineObject
NewSparklineObject creates a SparklineObject with default settings.
func (*SparklineObject) BaseName ¶
func (s *SparklineObject) BaseName() string
BaseName returns the base name prefix for auto-generated names.
func (*SparklineObject) Deserialize ¶
func (s *SparklineObject) Deserialize(r report.Reader) error
Deserialize reads SparklineObject properties from an FRX reader.
func (*SparklineObject) Serialize ¶
func (s *SparklineObject) Serialize(w report.Writer) error
Serialize writes SparklineObject properties that differ from defaults.
func (*SparklineObject) TypeName ¶
func (s *SparklineObject) TypeName() string
TypeName returns "SparklineObject".
type StringTrimming ¶
type StringTrimming int
StringTrimming specifies how to trim characters from a string that does not completely fit into a layout shape. Mirrors System.Drawing.StringTrimming.
const ( StringTrimmingNone StringTrimming = iota // no trimming (default) StringTrimmingCharacter // trim at character boundary StringTrimmingWord // trim at word boundary StringTrimmingEllipsisCharacter // ellipsis at character boundary StringTrimmingEllipsisWord // ellipsis at word boundary StringTrimmingEllipsisPath // ellipsis replacing path separator )
type SubreportObject ¶
type SubreportObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
SubreportObject embeds a reference to another report page, allowing nested report execution. It is the Go equivalent of FastReport.SubreportObject.
func NewSubreportObject ¶
func NewSubreportObject() *SubreportObject
NewSubreportObject creates a SubreportObject with defaults. Mirrors C# SubreportObject() constructor (SubreportObject.cs:146-154): FlagUseBorder, FlagUseFill, FlagPreviewVisible are false; CanCopy flag cleared.
func (*SubreportObject) Assign ¶
func (s *SubreportObject) Assign(src *SubreportObject)
Assign copies all SubreportObject properties from src. Mirrors C# SubreportObject.Assign (SubreportObject.cs:125-131).
func (*SubreportObject) Deserialize ¶
func (s *SubreportObject) Deserialize(r report.Reader) error
Deserialize reads SubreportObject properties.
func (*SubreportObject) PrintOnParent ¶
func (s *SubreportObject) PrintOnParent() bool
PrintOnParent returns whether the subreport prints on the parent page.
func (*SubreportObject) ReportName ¶
func (s *SubreportObject) ReportName() string
ReportName returns the file path of the external .frx report. When non-empty, the engine loads this file instead of a page in the current report. Mirrors FastReport.SubreportObject.ReportName.
func (*SubreportObject) ReportPageName ¶
func (s *SubreportObject) ReportPageName() string
ReportPageName returns the name of the linked ReportPage.
func (*SubreportObject) Serialize ¶
func (s *SubreportObject) Serialize(w report.Writer) error
Serialize writes SubreportObject properties that differ from defaults.
func (*SubreportObject) SetPrintOnParent ¶
func (s *SubreportObject) SetPrintOnParent(v bool)
SetPrintOnParent sets the print-on-parent flag.
func (*SubreportObject) SetReportName ¶
func (s *SubreportObject) SetReportName(name string)
SetReportName sets the external report file path.
func (*SubreportObject) SetReportPageName ¶
func (s *SubreportObject) SetReportPageName(name string)
SetReportPageName sets the linked page name.
type TextObject ¶
type TextObject struct {
TextObjectBase
// contains filtered or unexported fields
}
TextObject represents a text element that may display one or more lines. It is the Go equivalent of FastReport.TextObject.
func NewTextObject ¶
func NewTextObject() *TextObject
NewTextObject creates a TextObject with defaults.
func (*TextObject) AddHighlight ¶
func (t *TextObject) AddHighlight(c style.HighlightCondition)
AddHighlight appends a highlight condition.
func (*TextObject) Angle ¶
func (t *TextObject) Angle() int
Angle returns the text rotation in degrees.
func (*TextObject) ApplyStyle ¶
func (t *TextObject) ApplyStyle(entry *style.StyleEntry)
ApplyStyle overrides the base implementation to also propagate the font and text-fill colour from the style entry. Both the modern Apply* flags and the legacy *Changed flags are honoured.
func (*TextObject) AutoShrink ¶
func (t *TextObject) AutoShrink() AutoShrinkMode
AutoShrink returns the auto-shrink mode.
func (*TextObject) AutoShrinkMinSize ¶
func (t *TextObject) AutoShrinkMinSize() float32
AutoShrinkMinSize returns the minimum font size for auto-shrink.
func (*TextObject) AutoWidth ¶
func (t *TextObject) AutoWidth() bool
AutoWidth returns whether the object width grows to fit text.
func (*TextObject) Clip ¶
func (t *TextObject) Clip() bool
Clip returns whether text is clipped to the object bounds.
func (*TextObject) Deserialize ¶
func (t *TextObject) Deserialize(r report.Reader) error
Deserialize reads TextObject properties.
func (*TextObject) DeserializeChild ¶
func (t *TextObject) DeserializeChild(childType string, r report.Reader) bool
DeserializeChild handles <Highlight> and <Formats> child elements from FRX. It satisfies report.ChildDeserializer so that reportpkg.deserializeChildren can delegate unknown child elements to the TextObject itself.
func (*TextObject) FirstTabOffset ¶
func (t *TextObject) FirstTabOffset() float32
FirstTabOffset returns the offset of the first tab stop in pixels.
func (*TextObject) FontWidthRatio ¶
func (t *TextObject) FontWidthRatio() float32
FontWidthRatio returns the horizontal font scaling ratio (default 1.0).
func (*TextObject) ForceJustify ¶
func (t *TextObject) ForceJustify() bool
ForceJustify returns whether the last line is also justified.
func (*TextObject) Formats ¶
func (t *TextObject) Formats() *format.Collection
Formats returns the multi-format collection. Returns nil when no collection has been set (single-format mode via TextObjectBase.Format() is used instead).
func (*TextObject) GetExpressions ¶
func (t *TextObject) GetExpressions() []string
GetExpressions returns the list of expression strings used by this TextObject. Mirrors C# TextObject.GetExpressions (TextObject.cs:1574-1591):
- Base expressions from ReportComponentBase (VisibleExpression, PrintableExpression, etc.)
- All bracket expressions found in Text when AllowExpressions=true
- All highlight condition expressions
func (*TextObject) Highlights ¶
func (t *TextObject) Highlights() []style.HighlightCondition
Highlights returns the conditional-formatting rules for this object.
func (*TextObject) HorzAlign ¶
func (t *TextObject) HorzAlign() HorzAlign
HorzAlign returns the horizontal text alignment.
func (*TextObject) LineHeight ¶
func (t *TextObject) LineHeight() float32
LineHeight returns the fixed line height in pixels (0 = auto).
func (*TextObject) MergeMode ¶
func (t *TextObject) MergeMode() MergeMode
MergeMode returns the merge-mode flags.
func (*TextObject) ParagraphFormat ¶
func (t *TextObject) ParagraphFormat() ParagraphFormat
ParagraphFormat returns paragraph-level formatting.
func (*TextObject) ParagraphOffset ¶
func (t *TextObject) ParagraphOffset() float32
ParagraphOffset returns the indentation of the second and subsequent lines.
func (*TextObject) RightToLeft ¶
func (t *TextObject) RightToLeft() bool
RightToLeft returns whether text flows right-to-left.
func (*TextObject) Serialize ¶
func (t *TextObject) Serialize(w report.Writer) error
Serialize writes TextObject properties that differ from defaults.
func (*TextObject) SetAutoShrink ¶
func (t *TextObject) SetAutoShrink(m AutoShrinkMode)
SetAutoShrink sets the auto-shrink mode.
func (*TextObject) SetAutoShrinkMinSize ¶
func (t *TextObject) SetAutoShrinkMinSize(v float32)
SetAutoShrinkMinSize sets the minimum size for auto-shrink.
func (*TextObject) SetAutoWidth ¶
func (t *TextObject) SetAutoWidth(v bool)
SetAutoWidth sets auto-width.
func (*TextObject) SetFirstTabOffset ¶
func (t *TextObject) SetFirstTabOffset(v float32)
SetFirstTabOffset sets the first tab offset.
func (*TextObject) SetFontWidthRatio ¶
func (t *TextObject) SetFontWidthRatio(r float32)
SetFontWidthRatio sets the font width ratio.
func (*TextObject) SetForceJustify ¶
func (t *TextObject) SetForceJustify(v bool)
SetForceJustify sets the force-justify flag.
func (*TextObject) SetFormats ¶
func (t *TextObject) SetFormats(fc *format.Collection)
SetFormats replaces the multi-format collection.
func (*TextObject) SetHighlights ¶
func (t *TextObject) SetHighlights(h []style.HighlightCondition)
SetHighlights replaces the highlights slice.
func (*TextObject) SetHorzAlign ¶
func (t *TextObject) SetHorzAlign(a HorzAlign)
SetHorzAlign sets the horizontal alignment.
func (*TextObject) SetLineHeight ¶
func (t *TextObject) SetLineHeight(v float32)
SetLineHeight sets the line height.
func (*TextObject) SetMergeMode ¶
func (t *TextObject) SetMergeMode(m MergeMode)
SetMergeMode sets the merge mode.
func (*TextObject) SetParagraphFormat ¶
func (t *TextObject) SetParagraphFormat(pf ParagraphFormat)
SetParagraphFormat sets the paragraph format.
func (*TextObject) SetParagraphOffset ¶
func (t *TextObject) SetParagraphOffset(v float32)
SetParagraphOffset sets the paragraph offset.
func (*TextObject) SetRightToLeft ¶
func (t *TextObject) SetRightToLeft(v bool)
SetRightToLeft sets the right-to-left flag.
func (*TextObject) SetTabPositions ¶
func (t *TextObject) SetTabPositions(positions []float32)
SetTabPositions sets the custom tab stop positions.
func (*TextObject) SetTabWidth ¶
func (t *TextObject) SetTabWidth(v float32)
SetTabWidth sets the tab width.
func (*TextObject) SetTextColor ¶
func (t *TextObject) SetTextColor(c color.RGBA)
SetTextColor sets the foreground text color.
func (*TextObject) SetTextOutline ¶
func (t *TextObject) SetTextOutline(v style.TextOutline)
SetTextOutline sets the text stroke/outline settings.
func (*TextObject) SetTextRenderType ¶
func (t *TextObject) SetTextRenderType(r TextRenderType)
SetTextRenderType sets the render type.
func (*TextObject) SetTrimming ¶
func (t *TextObject) SetTrimming(v StringTrimming)
SetTrimming sets the string trimming mode.
func (*TextObject) SetUnderlines ¶
func (t *TextObject) SetUnderlines(v bool)
SetUnderlines sets the underlines flag.
func (*TextObject) SetVertAlign ¶
func (t *TextObject) SetVertAlign(a VertAlign)
SetVertAlign sets the vertical alignment.
func (*TextObject) SetWordWrap ¶
func (t *TextObject) SetWordWrap(v bool)
SetWordWrap sets word-wrap.
func (*TextObject) SetWysiwyg ¶
func (t *TextObject) SetWysiwyg(v bool)
SetWysiwyg sets the WYSIWYG flag.
func (*TextObject) TabPositions ¶
func (t *TextObject) TabPositions() []float32
TabPositions returns the custom tab stop positions in pixels. Returns nil when no custom tab stops have been set (TabWidth is used instead). C# ref: TextObject.TabPositions (TextObject.cs line 466).
func (*TextObject) TabWidth ¶
func (t *TextObject) TabWidth() float32
TabWidth returns the tab stop interval in pixels.
func (*TextObject) TextColor ¶
func (t *TextObject) TextColor() color.RGBA
TextColor returns the foreground text color. The default is opaque black {0, 0, 0, 255}.
func (*TextObject) TextOutline ¶
func (t *TextObject) TextOutline() style.TextOutline
TextOutline returns the text stroke/outline settings.
func (*TextObject) TextRenderType ¶
func (t *TextObject) TextRenderType() TextRenderType
TextRenderType returns the rendering engine selection.
func (*TextObject) Trimming ¶
func (t *TextObject) Trimming() StringTrimming
Trimming returns the string trimming mode. C# ref: TextObject.Trimming (TextObject.cs line 540).
func (*TextObject) Underlines ¶
func (t *TextObject) Underlines() bool
Underlines returns whether each text line has an underline drawn below it.
func (*TextObject) VertAlign ¶
func (t *TextObject) VertAlign() VertAlign
VertAlign returns the vertical text alignment.
func (*TextObject) WordWrap ¶
func (t *TextObject) WordWrap() bool
WordWrap returns whether text wraps to multiple lines.
func (*TextObject) Wysiwyg ¶
func (t *TextObject) Wysiwyg() bool
Wysiwyg returns whether the object is rendered in WYSIWYG mode.
type TextObjectBase ¶
type TextObjectBase struct {
report.BreakableComponent
// contains filtered or unexported fields
}
TextObjectBase is the base for text objects (TextObject). It is the Go equivalent of FastReport.TextObjectBase.
func NewTextObjectBase ¶
func NewTextObjectBase() *TextObjectBase
NewTextObjectBase creates a TextObjectBase with defaults. C# default padding is (2, 0, 2, 0) — left=2, top=0, right=2, bottom=0.
func (*TextObjectBase) AllowExpressions ¶
func (t *TextObjectBase) AllowExpressions() bool
AllowExpressions returns whether the text may contain expressions.
func (*TextObjectBase) Brackets ¶
func (t *TextObjectBase) Brackets() string
Brackets returns the expression delimiter symbols (e.g. "[,]").
func (*TextObjectBase) Deserialize ¶
func (t *TextObjectBase) Deserialize(r report.Reader) error
Deserialize reads TextObjectBase properties.
func (*TextObjectBase) Duplicates ¶
func (t *TextObjectBase) Duplicates() Duplicates
Duplicates returns how duplicate values are handled.
func (*TextObjectBase) Editable ¶
func (t *TextObjectBase) Editable() bool
Editable returns whether the text can be edited in the viewer.
func (*TextObjectBase) Format ¶
func (t *TextObjectBase) Format() format.Format
Format returns the value formatter for this text object. Returns nil when no explicit format has been set (GeneralFormat).
func (*TextObjectBase) HideValue ¶
func (t *TextObjectBase) HideValue() string
HideValue returns the specific value string that is hidden.
func (*TextObjectBase) HideZeros ¶
func (t *TextObjectBase) HideZeros() bool
HideZeros returns whether zero values are hidden.
func (*TextObjectBase) NullValue ¶
func (t *TextObjectBase) NullValue() string
NullValue returns the text shown when a data value is null/nil.
func (*TextObjectBase) Padding ¶
func (t *TextObjectBase) Padding() Padding
Padding returns interior padding.
func (*TextObjectBase) ProcessAt ¶
func (t *TextObjectBase) ProcessAt() ProcessAt
ProcessAt returns when this object is processed by the engine.
func (*TextObjectBase) Serialize ¶
func (t *TextObjectBase) Serialize(w report.Writer) error
Serialize writes TextObjectBase properties that differ from defaults.
func (*TextObjectBase) SetAllowExpressions ¶
func (t *TextObjectBase) SetAllowExpressions(v bool)
SetAllowExpressions sets the allow-expressions flag.
func (*TextObjectBase) SetBrackets ¶
func (t *TextObjectBase) SetBrackets(s string)
SetBrackets sets the expression delimiters.
func (*TextObjectBase) SetDuplicates ¶
func (t *TextObjectBase) SetDuplicates(d Duplicates)
SetDuplicates sets the duplicate-handling mode.
func (*TextObjectBase) SetEditable ¶
func (t *TextObjectBase) SetEditable(v bool)
SetEditable sets the editable flag.
func (*TextObjectBase) SetFormat ¶
func (t *TextObjectBase) SetFormat(f format.Format)
SetFormat sets the value formatter.
func (*TextObjectBase) SetHideValue ¶
func (t *TextObjectBase) SetHideValue(s string)
SetHideValue sets the specific value to hide.
func (*TextObjectBase) SetHideZeros ¶
func (t *TextObjectBase) SetHideZeros(v bool)
SetHideZeros sets the hide-zeros flag.
func (*TextObjectBase) SetNullValue ¶
func (t *TextObjectBase) SetNullValue(s string)
SetNullValue sets the null-replacement text.
func (*TextObjectBase) SetPadding ¶
func (t *TextObjectBase) SetPadding(p Padding)
SetPadding sets interior padding.
func (*TextObjectBase) SetProcessAt ¶
func (t *TextObjectBase) SetProcessAt(p ProcessAt)
SetProcessAt sets the process timing.
func (*TextObjectBase) Text ¶
func (t *TextObjectBase) Text() string
Text returns the object's text (may contain expressions like "[Date]").
type TextRenderType ¶
type TextRenderType int
TextRenderType selects the rendering engine.
const ( TextRenderTypeDefault TextRenderType = iota TextRenderTypeHtmlTags TextRenderTypeHtmlParagraph TextRenderTypeInline )
type UncheckedSymbol ¶
type UncheckedSymbol int
UncheckedSymbol specifies the symbol drawn when a CheckBox is unchecked.
const ( UncheckedSymbolNone UncheckedSymbol = iota UncheckedSymbolCross UncheckedSymbolMinus UncheckedSymbolSlash UncheckedSymbolBackSlash )
type VertAlign ¶
type VertAlign int
VertAlign specifies vertical text alignment.
func ParseVertAlign ¶
ParseVertAlign parses a vertical alignment value from an FRX attribute. FRX files may store alignment as a string name ("Top", "Center", "Bottom") or as a numeric string ("0", "1", "2").
type ZipCodeObject ¶
type ZipCodeObject struct {
report.ReportComponentBase
// contains filtered or unexported fields
}
ZipCodeObject renders a Russian postal (GOST R 51506-99) zip code barcode. It is the Go equivalent of FastReport.ZipCodeObject, which complies with GOST R 51506-99.
func NewZipCodeObject ¶
func NewZipCodeObject() *ZipCodeObject
NewZipCodeObject creates a ZipCodeObject with defaults matching FastReport .NET. C# ZipCodeObject constructor (ZipCodeObject.cs line 362-378):
segmentWidth = Units.Centimeters * 0.5f // 18.9 px segmentHeight = Units.Centimeters * 1 // 37.8 px spacing = Units.Centimeters * 0.9f // 34.02 px segmentCount = 6 showMarkers = true showGrid = true text = "123456"
func (*ZipCodeObject) Assign ¶
func (z *ZipCodeObject) Assign(src *ZipCodeObject)
Assign copies all ZipCodeObject properties from src. Mirrors C# ZipCodeObject.Assign (ZipCodeObject.cs:247-263).
func (*ZipCodeObject) DataColumn ¶
func (z *ZipCodeObject) DataColumn() string
DataColumn returns the data source column name.
func (*ZipCodeObject) Deserialize ¶
func (z *ZipCodeObject) Deserialize(r report.Reader) error
Deserialize reads ZipCodeObject properties, using C# defaults as fallback when attributes are absent from the FRX file.
func (*ZipCodeObject) Expression ¶
func (z *ZipCodeObject) Expression() string
Expression returns the zip code expression.
func (*ZipCodeObject) GetData ¶
func (z *ZipCodeObject) GetData(calc func(string) (any, error))
GetData evaluates the DataColumn or Expression binding using the provided calc function and updates the Text value accordingly. Mirrors C# ZipCodeObject.GetData / GetDataShared (ZipCodeObject.cs line 338-356).
func (*ZipCodeObject) GetExpressions ¶
func (z *ZipCodeObject) GetExpressions() []string
GetExpressions returns the list of expressions that need to be evaluated by the report engine. Mirrors C# ZipCodeObject.GetExpressions() (ZipCodeObject.cs line 325-335).
func (*ZipCodeObject) SegmentCount ¶
func (z *ZipCodeObject) SegmentCount() int
SegmentCount returns the number of digit segments (default 6).
func (*ZipCodeObject) SegmentHeight ¶
func (z *ZipCodeObject) SegmentHeight() float32
SegmentHeight returns the height of one digit segment in pixels.
func (*ZipCodeObject) SegmentWidth ¶
func (z *ZipCodeObject) SegmentWidth() float32
SegmentWidth returns the width of one digit segment in pixels.
func (*ZipCodeObject) Serialize ¶
func (z *ZipCodeObject) Serialize(w report.Writer) error
Serialize writes ZipCodeObject properties that differ from defaults. Mirrors C# ZipCodeObject.Serialize (ZipCodeObject.cs line 295-320): only writes attributes that differ from the default instance.
func (*ZipCodeObject) SetDataColumn ¶
func (z *ZipCodeObject) SetDataColumn(v string)
SetDataColumn sets the data source column name.
func (*ZipCodeObject) SetExpression ¶
func (z *ZipCodeObject) SetExpression(v string)
SetExpression sets the zip code expression.
func (*ZipCodeObject) SetSegmentCount ¶
func (z *ZipCodeObject) SetSegmentCount(v int)
SetSegmentCount sets the number of digit segments.
func (*ZipCodeObject) SetSegmentHeight ¶
func (z *ZipCodeObject) SetSegmentHeight(v float32)
SetSegmentHeight sets the segment height.
func (*ZipCodeObject) SetSegmentWidth ¶
func (z *ZipCodeObject) SetSegmentWidth(v float32)
SetSegmentWidth sets the segment width.
func (*ZipCodeObject) SetShowGrid ¶
func (z *ZipCodeObject) SetShowGrid(v bool)
SetShowGrid sets the ShowGrid flag.
func (*ZipCodeObject) SetShowMarkers ¶
func (z *ZipCodeObject) SetShowMarkers(v bool)
SetShowMarkers sets the ShowMarkers flag.
func (*ZipCodeObject) SetSpacing ¶
func (z *ZipCodeObject) SetSpacing(v float32)
SetSpacing sets the spacing.
func (*ZipCodeObject) SetText ¶
func (z *ZipCodeObject) SetText(v string)
SetText sets the zip code string.
func (*ZipCodeObject) ShowGrid ¶
func (z *ZipCodeObject) ShowGrid() bool
ShowGrid returns whether the digit grid is drawn.
func (*ZipCodeObject) ShowMarkers ¶
func (z *ZipCodeObject) ShowMarkers() bool
ShowMarkers returns whether reference markers are drawn.
func (*ZipCodeObject) Spacing ¶
func (z *ZipCodeObject) Spacing() float32
Spacing returns the spacing between digit segment origins in pixels.
func (*ZipCodeObject) Text ¶
func (z *ZipCodeObject) Text() string
Text returns the zip code string.