svg_utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

功能:生成牌型统计svg图 说明:

功能: 说明:

Index

Constants

View Source
const (
	W_TOTAL_RUN_TIMES_HEADING = 100 //总运行次数
	W_DEAL_CARD_CNT_HEADING   = 80  //发牌张数
	W_CARD_TYPE_HEADING       = 100 //牌型
	W_TYPE_CNT_HEADING        = 120 //当前牌型个数
	W_PERCENTAGE_HEADING      = 100 //百分比
)
View Source
const (
	SCALE                   = 1.5                         //缩放比
	H_PER_ROW               = 30                          //每行高
	H_HEADER                = 40                          //header高
	H_HEADING               = int(1.5 * H_PER_ROW)        //标题
	H_FOOTER                = 40                          //footer高
	TXT_FOOTER              = xutils.POKER_X_STUDIO       //页脚 文字
	TXT_HEADER_UTLIMATE     = "Ultimate Texas holdem牌型统计" //
	TXT_HEADER_TEXAS_HOLDEM = "Texas holdem牌型统计"          //
	STYLE_BG                = "fill:#8B4500"              //svg背景
	STYLE_HEADER_TXT        = "font-size:22;fill:#FFF"    //
	STYLE_HEADING_BG        = "fill:#838B83"              //svg标题背景
	STYLE_HEADING_TXT       = "font-size:18;fill:#FFF"    //
	STYLE_FOOTER_TXT        = "font-size:22;fill:#FFF"    //
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CardTypeStat

type CardTypeStat struct {
	Total_run_times int            //总运行次数
	Deal_card_cnt   int            //发牌张数
	Type            CARD_TYPE.TYPE //牌型
	Type_cnt        int            //当前牌型个数
	Percentage      float64        //百分比
}

type CardTypeStatSvg

type CardTypeStatSvg struct {
	// contains filtered or unexported fields
}

func Instance_card_type_stat_svg

func Instance_card_type_stat_svg() *CardTypeStatSvg

单例

func (*CardTypeStatSvg) Make_svg

func (c *CardTypeStatSvg) Make_svg(header string, stats []*CardTypeStat) string

Make_svg 生成svg图 返回:svg图字符串

Jump to

Keyboard shortcuts

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