GdipText(str1, str2:="", options:="", ColorBG:="FFFFFF", Font:="Microsoft YaHei UI"){
	static init:=0, @TSF:=0, Hidefg:=0, DPI:=A_ScreenDPI/96, lastw:=0, lasth:=0
		, MaxScreenWidth:=DllCall("GetSystemMetrics", "Int", 78)
		, MaxScreenHeight:=DllCall("GetSystemMetrics", "Int", 79)
	global pToken
	If (options="Shutdown"){
		If (init){
			init:=0
			Gui, TSF: Destroy
		}
		If (pToken)
			Gdip_Shutdown(pToken), pToken:=0
		Return
	} Else If (!init){
		Gui, TSF: -Caption +E0x8080088 +LastFound +hwnd@TSF
		Gui, TSF: Show, NA
		init:=1
	}
	RegExMatch(Options, "i)C(?!(entre|enter))([a-f\d]+)", Colour)
	RegExMatch(Options, "i)S(\d+)", Size)
	RegExMatch(Options, "i)X(-?\d+)", xpos)
	RegExMatch(Options, "i)Y(-?\d+)", ypos)
	If (str1=""&&str2=""){
		If (!Hidefg){
			Hidefg:=1
			Gui, TSF:Hide
		}
		lasth:=0, lastw:=0
		Return
	} Else {
		If (xpos="")||(ypos="")
			Return
		If !pToken&&(!pToken:=Gdip_Startup()){
			MsgBox, 48, GDIPlus Error!, GDIPlus failed to start. Please ensure you have gdiplus on your system, 5
			ExitApp
		}
		If (Hidefg){
			Hidefg:=0
			Gui, TSF:Show, NA w1 h1
		}
	}
	str:=str1 "`n" str2
	; 测量字符像素
	hbm := CreateDIBSection(1, 1), hdc := CreateCompatibleDC()
	obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc)
	CreateRectF(RC, 0, 0, MaxScreenWidth, MaxScreenHeight)
	hFamily := Gdip_FontFamilyCreate(Font), hFont := Gdip_FontCreate(hFamily, Size1*DPI, 0)
	hFormat := Gdip_StringFormatCreate(0x4000)
	; h1:=StrSplit(Gdip_MeasureString(G, str1, hFont, hFormat, RC), "|")[4]
	ReturnRC:=StrSplit(Gdip_MeasureString(G, str, hFont, hFormat, RC), "|")
	SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteGraphics(G)
	; 设置界面像素增量
	Width:=ReturnRC[3]+15, Height:=ReturnRC[4]+10
	; Width:=Max(Width,lastw), Height:=Max(Height,lasth)
	hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC()
	obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc)
	Gdip_SetSmoothingMode(G, 2), pBrush := Gdip_BrushCreateSolid("0xFF" ColorBG)
	; 画边框
	; pPen := Gdip_CreatePen("0xFF" Colour, 1), Gdip_DrawRoundedRectangle(G, pPen, 0, 0, Width-2, Height-2, 5)
	; 背景色
	Gdip_FillRoundedRectangle(G, pBrush, 0, 0, Width-2, Height-2, 5)
	; 画文本
	Gdip_TextToGraphics(G, str, "x8 y0p vCenter cff" Colour " s" Size1*DPI, Font, Width, Height)
	; Gdip_TextToGraphics(G, str, "x8 y10 cff" Colour " s" Size1*DPI, Font, Width, Height)
	; 分隔线
	; Gdip_DrawLine(G, pPen, 0, h1, Width, h1), Gdip_DeletePen(pPen)
	; 识别扩展屏，双屏
	If xpos1<A_ScreenWidth
		ScreenWidth:=A_ScreenWidth, Left:=0, xpos1:=xpos1<0?0:xpos1
	Else
		ScreenWidth:=MaxScreenWidth, Left:=A_ScreenWidth, xpos1:=xpos1>MaxScreenWidth?MaxScreenWidth:xpos1
	UpdateLayeredWindow(@TSF, hdc, Min(xpos1, Max(Left, ScreenWidth-Width)), Min(ypos1, Max(0, A_ScreenHeight-Height)), Width, Height)
	Gdip_DeleteGraphics(G), SelectObject(hdc, obm), DeleteObject(hbm), DeleteDC(hdc), Gdip_DeleteBrush(pBrush), lasth:=Height, lastw:=Width
	Gui, TSF:+AlwaysOnTop
}