seal

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package seal 计算印章裁剪框与源图像素区域,不加载印章或执行绘制。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClipBox

func ClipBox(boundary, clip spec.StBox) (spec.StBox, bool)

ClipBox 将 StampAnnot.Clip 夹入 Boundary 并返回页面上的目标框。 Boundary 与 Clip 分别对应 GB/T 33190—2016 §18.2.3 表69 的定位与裁剪属性。 Clip 相对印章左上角;缺省、零尺寸或完全位于盒外时返回 false,沿用整枚印章。

func CropRect

func CropRect(bounds image.Rectangle, boundary, dst spec.StBox) (image.Rectangle, bool)

CropRect 按目标框相对 Boundary 的比例计算源图裁剪区域,保留原图非零原点。 坐标按最近像素取整并夹回原图。无有效区域或覆盖整图时返回 false,复用原图。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL