Font invert
Moderators: David Barker, Jerry Messina
Font invert
How can i invert the font with this line (black background), i don't andestand the help topic
GLCD.SetFont(ArialBold)
GLCD.WriteAt(60,40,"ALARME")
thanks
GLCD.SetFont(ArialBold)
GLCD.WriteAt(60,40,"ALARME")
thanks
From Swordfish help ....
Octal
you have to set the font style fsXOR I think.structure TFont
Header as word
Data as word
Width as byte
Height as byte
Style as byte
LetterSpacing as byte
NumberOfChars as Header.Byte1
IsFixed as Header.Booleans(0)
IsVariable as Header.Booleans(1)
IsScanX as Header.Booleans(6)
IsScanY as Header.Booleans(7)
end structure
Header - The font header
Data - Start address of the font data table
Width - The font width, in pixels. For variable width fonts, this value is 0.
Height - The font height, in pixels.
Style - The font style. Can be fsNormal, fsMerge, fsXOR or fsInvert. Please note that different GLCD drivers may only allow a subset of font styles to be used or none at all. You should refer to specific driver documentation for information on supported font styles.
LetterSpacing - The distance between font characters, in pixels.
NumberOfChars - The number of characters in a font table.
IsFixed - Font fixed width flag
IsVariable - Font variable width flag
IsScanX - Font data is scanned along x flag
IsScanY - Font data is scanned along y flag
RegardsFont as TFont
The graphics Font variable holds information about the currently loaded font. It also enables certain rendering characteristics of the font to be changed. For example, style and letter spacing. Note that different GLCD drivers may only allow a subset of font members to be used. You should refer to specific driver documentation for further information.
Octal
Ensure that you have both of these includes at the top (after the device & clock settings):
Then use:
Steve
Code: Select all
Include "Graphics.bas"
Include "GLCD.bas"
Code: Select all
SetFont(ArialBold)
Font.Style = fsInvert
I have a error : Function call expected with this line : Font.style (fsinvert)
[quote="Steven"]Ensure that you have both of these includes at the top (after the device & clock settings):
Then use:
Code: Select all
Sub alarme1 ()
GLCD.Cls
GLCD.SetImage(0,0,alarme)
text = DecToStr(t)
GLCD.SetFont(Arial13x12)
Font.Style (fsInvert)
GLCD.WriteAt(80,10,text)
Code: Select all
Include "Graphics.bas"
Include "GLCD.bas"
Code: Select all
SetFont(ArialBold)
Font.Style = fsInvert
1 day to modify my Mikroe code for SF code.
My project, is for my 4x4. Temp sensor on the shocks, water, oil, and other. cause i go to tunisia in 2008, and it's very high temp for shocks. So if want return in france, it's a good system for slow drive
Sorry for my english, but the scool is....longuer ?
My project, is for my 4x4. Temp sensor on the shocks, water, oil, and other. cause i go to tunisia in 2008, and it's very high temp for shocks. So if want return in france, it's a good system for slow drive
Sorry for my english, but the scool is....longuer ?
Hey Mast,
photos are really impressive. Once your system finished, it would be nice to post something about the final project (description+photos) on the Featured Products page of the Swordfish WIKI http://www.sfcompiler.co.uk/wiki/pmwiki ... edProducts
Please Mast, do it before going to Tunisia, because if your code does not work fine ... your 4x4 will burn and it will take a lot of time to you to come back on a camel
photos are really impressive. Once your system finished, it would be nice to post something about the final project (description+photos) on the Featured Products page of the Swordfish WIKI http://www.sfcompiler.co.uk/wiki/pmwiki ... edProducts
Please Mast, do it before going to Tunisia, because if your code does not work fine ... your 4x4 will burn and it will take a lot of time to you to come back on a camel
hehehe ... you have been (sword)fished .... a new converted user I'm becoming Swordfish Evangelist
btw. I cleaned up the code for 192x64 GLCD Module. The code will be published this afternoon (I hope) to let users have the possibility to use GLCDs with CS3 line. Steven gave me instead a totally rewritten (deeply modified) for SED1520 modules that can work for GLCDs with two or three CS lines. I'm trying to modify it a bit and to test it before I publish final version.
Regards
Octal
btw. I cleaned up the code for 192x64 GLCD Module. The code will be published this afternoon (I hope) to let users have the possibility to use GLCDs with CS3 line. Steven gave me instead a totally rewritten (deeply modified) for SED1520 modules that can work for GLCDs with two or three CS lines. I'm trying to modify it a bit and to test it before I publish final version.
Regards
Octal