• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang style.Style函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/iostrovok/svg/style.Style函数的典型用法代码示例。如果您正苦于以下问题:Golang Style函数的具体用法?Golang Style怎么用?Golang Style使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Style函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: Test_path_Style

func (s PATHTestsSuite) Test_path_Style(c *C) {
	// c.Skip(`Not now")

	p := Path(style.Style().StrokeRGB(10, 20, 30))
	p = p.M(0, 0).L(100, 200)
	st := style.Style().FillRGB(1, 2, 3)
	p = p.Style(st).Append(Title("WWW"))
	obtained := cSL(`<path d="M0,0 L100,200" style="fill:rgb(1,2,3)"><title>WWW</title></path>`)

	c.Assert(cSL(p.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:11,代码来源:path_test.go


示例2: Test_polyline2

func (s POLYLINETestsSuite) Test_polyline2(c *C) {
	//c.Skip("Not now")

	l := Polyline(style.Style().StrokeRGB(10, 20, 30))
	res := l.Source()
	c.Assert(cSL(res), Equals, "")
}
开发者ID:iostrovok,项目名称:svg,代码行数:7,代码来源:polyline_test.go


示例3: Test_use2

func (s USETestsSuite) Test_use2(c *C) {
	//c.Skip("Not now")

	l := Use(style.Style().StrokeRGB(10, 20, 30))
	res := l.Source()
	c.Assert(cSL(res), Equals, ``)
}
开发者ID:iostrovok,项目名称:svg,代码行数:7,代码来源:use_test.go


示例4: Test_line

func (s LINETestsSuite) Test_line(c *C) {
	//c.Skip("Not now")

	l := Line(1, 2, 3, 4)
	c.Assert(l, NotNil)
	l2 := Line(1, 2, 3, 4, style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:line_test.go


示例5: Test_rect

func (s RECTTestsSuite) Test_rect(c *C) {
	//c.Skip("Not now")

	l := Rect(1, 2, 3, 4)
	c.Assert(l, NotNil)
	l2 := Rect(1, 2, 3, 4, style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:rect_test.go


示例6: Test_use_href

func (s USETestsSuite) Test_use_href(c *C) {
	//c.Skip("Not now")
	obtained := cSL(`<use xlink:href="#MySymbol" style="stroke:rgb(10,20,30)"/>`)

	l := Use(style.Style().StrokeRGB(10, 20, 30)).Href(`#MySymbol`)
	res := l.Source()
	c.Assert(cSL(res), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:use_test.go


示例7: Test_group

func (s GROUPTestsSuite) Test_group(c *C) {
	//c.Skip("Not now")

	l := Group()
	c.Assert(l, NotNil)
	l2 := Group(style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:g_test.go


示例8: Test_path_Aa

func (s PATHTestsSuite) Test_path_Aa(c *C) {
	//c.Skip(`Not now")

	obtained := cSL(`<path d="M0,0 A10,20 30 1,1 40,50 a11,21 31 0,0 41,51" style="stroke:rgb(10,20,30)"/>`)
	p := Path(style.Style().StrokeRGB(10, 20, 30))
	p = p.M(0, 0).A(10, 20, 30, 1, 1, 40, 50).Aa(11, 21, 31, 0, 0, 41, 51)
	c.Assert(cSL(p.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:path_test.go


示例9: Test_polyline

func (s POLYLINETestsSuite) Test_polyline(c *C) {
	//c.Skip("Not now")

	l := Polyline()
	c.Assert(l, NotNil)
	l2 := Polyline(style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:polyline_test.go


示例10: Test_text

func (s TEXTTestsSuite) Test_text(c *C) {
	//c.Skip("Not now")

	t1 := Text()
	c.Assert(t1, NotNil)
	t2 := Text(style.Style())
	c.Assert(t2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:text_test.go


示例11: Test_polygon

func (s POLYGONTestsSuite) Test_polygon(c *C) {
	//c.Skip("Not now")

	l := Polygon()
	c.Assert(l, NotNil)
	l2 := Polygon(style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:polygon_test.go


示例12: Test_use

func (s USETestsSuite) Test_use(c *C) {
	//c.Skip("Not now")

	l := Use()
	c.Assert(l, NotNil)
	l2 := Use(style.Style())
	c.Assert(l2, NotNil)
}
开发者ID:iostrovok,项目名称:svg,代码行数:8,代码来源:use_test.go


示例13: Test_rect2

func (s RECTTestsSuite) Test_rect2(c *C) {
	//c.Skip("Not now")

	obtained := cSL(`<rect height="4" width="3" x="1" y="2" style="stroke:rgb(10,20,30)"/>`)

	l := Rect(1, 2, 3, 4, style.Style().StrokeRGB(10, 20, 30))
	res := l.Source()
	c.Assert(cSL(res), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:rect_test.go


示例14: Test_path_HhVv

func (s PATHTestsSuite) Test_path_HhVv(c *C) {
	//c.Skip(`Not now")

	obtained := cSL(`<path d="M0,0 V100 v200 H300 h400" style="stroke:rgb(10,20,30)"/>`)

	p := Path(style.Style().StrokeRGB(10, 20, 30))
	p = p.M(0, 0).V(100).Vv(200).H(300).Hh(400)
	c.Assert(cSL(p.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:path_test.go


示例15: Test_Style

func (s TAGTestsSuite) Test_Style(c *C) {
	//c.Skip("Not now")
	obtained := cSL(`<g style="fill:rgb(1,2,3)"/>`)

	st := style.Style().FillRGB(1, 2, 3)

	l := Tag("g").Style(st)
	c.Assert(cSL(l.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:tag_test.go


示例16: Test_Style

func (s GROUPTestsSuite) Test_Style(c *C) {
	//c.Skip("Not now")
	obtained := cSL(`<g style="fill:rgb(1,2,3)"><title>WWW</title></g>`)

	l := Group()
	st := style.Style().FillRGB(1, 2, 3)
	l = l.Style(st).Append(Title("WWW"))
	c.Assert(cSL(l.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:g_test.go


示例17: Test_group2

func (s GROUPTestsSuite) Test_group2(c *C) {
	//c.Skip("Not now")

	obtained := cSL(`<g style="stroke:rgb(10,20,30)"/>`)

	l := Group(style.Style().StrokeRGB(10, 20, 30))
	res := l.Source()
	c.Assert(cSL(res), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:g_test.go


示例18: Test_path_Cc

func (s PATHTestsSuite) Test_path_Cc(c *C) {
	//c.Skip(`Not now")

	obtained := cSL(`<path d="M0,0 C10,20 30,40 50,60 c11,21 31,41 51,61" style="stroke:rgb(10,20,30)"/>`)

	p := Path(style.Style().StrokeRGB(10, 20, 30))
	p = p.M(0, 0).C(10, 20, 30, 40, 50, 60).Cc(11, 21, 31, 41, 51, 61)
	c.Assert(cSL(p.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:path_test.go


示例19: Test_path_Qq

func (s PATHTestsSuite) Test_path_Qq(c *C) {
	//c.Skip(`Not now")

	obtained := cSL(`<path d="M0,0 Q1,2 3,4 q5,6 7,8 S9,0 10,11 s12,13 14,15" style="stroke:rgb(10,20,30)"/>`)

	p := Path(style.Style().StrokeRGB(10, 20, 30))
	p = p.M(0, 0).Q(1, 2, 3, 4).Qq(5, 6, 7, 8).S(9, 0, 10, 11).Ss(12, 13, 14, 15)
	c.Assert(cSL(p.Source()), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:path_test.go


示例20: Test_line2

func (s LINETestsSuite) Test_line2(c *C) {
	//c.Skip("Not now")

	obtained := cSL(`<line x1="1" y1="2" x2="3" y2="4" style="stroke:rgb(10,20,30)" />`)

	l := Line(1, 2, 3, 4, style.Style().StrokeRGB(10, 20, 30))
	res := l.Source()
	c.Assert(cSL(res), Equals, obtained)
}
开发者ID:iostrovok,项目名称:svg,代码行数:9,代码来源:line_test.go



注:本文中的github.com/iostrovok/svg/style.Style函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang go-datastore.Key类代码示例发布时间:2022-05-23
下一篇:
Golang bruxism.Service类代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap