FireShotGo

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

Fork me on Gitee

[TOC]

FireShotGo

项目简介

FireShotGo是使用fyne实现的一个跨平台截图软件

对于Fyne陌生的同学可以参考 fyne club上面已经实现了详细的文档和对应每小节对应的源码

安装信息

Linux

Linux上需要安装gtk库,以及依赖的库

ubuntu上可以使用如下命令安装

sudo apt-get install libappindicator3-dev -y
sudo apt-get install libgtk-3-dev
Windows

windows上需要安装配置MinGW环境,并配置go语言开发环境

使用库

请确保本地的go的SDK版本是1.16或以上,否则不支持//go:embed语法

想按照库使用仅仅需要执行如下语句go get gitee.com/andrewgithub/FireShotGo即可将源码安装到本地,如果想在本地开发,可以直接使用git拉取仓库使用。

历史版本

v1.0.0

主要功能,实现截图的基本功能,能够绘制箭头,绘制椭圆型标记,添加文本的基本功能

功耗

在八核的ubuntu及机器上,一般占用CPU5.9左右

v1.0.1
  • 添加中文注释
  • 该版本没有新增功能,主要是对原有的逻辑添加中文注释,并迁移到gitee上,方便后期团队开发

具体方式,下载中文字体,并将对应字体通过fyne工具生成静态资源文件,在通过主题的Font接口返回

v1.0.2
  • 支持中文,标题全部按照中文显示
  • 更换为左边状态栏,更符合国人使用习惯
image-20210928124244222
fyne bundle xxxxx.ttf > bundle.go

比如我们这里使用中文字体实现的一个主题

package firetheme

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/theme"
	"image/color"
)

type ShanGShouJianSongTheme struct{}

//var _ fyne.Theme = (*ShanGShouJianSongTheme)(nil)

// Font 返回的就是字体名
func (m ShanGShouJianSongTheme) Font(s fyne.TextStyle) fyne.Resource {
	return resourceShangShouJianSongXianXiTi2Ttf
}

func (*ShanGShouJianSongTheme) Color(n fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {
	return theme.DefaultTheme().Color(n, v)
}

func (*ShanGShouJianSongTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
	return theme.DefaultTheme().Icon(n)
}

func (*ShanGShouJianSongTheme) Size(n fyne.ThemeSizeName) float32 {
	return theme.DefaultTheme().Size(n)
}

v1.0.3
  • 支持等宽直线功能
image-20210929001751677
v1.0.4

支持文本的中文输入

image-20210929123025162

加入我们

扫描二维码,拉你进入FireShotGo开发大家庭,一起学习,一起进步!

TODO

  • 支持中文
  • 支持直线绘制
  • 支持等宽直线绘制
  • 支持叠加中文文本
  • 支持虚线绘制
  • 支持矩形框功能
  • 支持鼠标截图功能
  • 支持选择屏幕功能
  • 支持多种字体
  • 支持多种字体的中文文本叠加

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package screenshot implements the screenshot edit window.
Package screenshot implements the screenshot edit window.

Jump to

Keyboard shortcuts

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