Christian Grasser a61b03ea88 Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5
Update with https://www.scintilla.org/scintilla521.zip
            https://www.scintilla.org/lexilla515.zip

- fix setting to bring Scintilla::PositionCR from ScintillaStructures.h inline with Sci_Position.h Sci_PositionCR
- add workaround to enable lexer for searchResult
commented out SCI_SETILEXER call on searchResult to get one result which is correctly handled by the lexer,
added comment about the current problem with property @MarkingsStruct which seems to disappear after call to SCI_SETILEXER or CreateLexer
- corrected usage of ObjC lexer
- removed unnecessary filter stuff
- use own sections for scintilla and lexilla build targets and allow parallel builds
- as libscilex is no longer existing, changed to libscintilla
- adapt makefiles and cmake
- use VS2019
- started simple changes for createlexer adaptations, nullpointercheck missing on return of lexer name from deprecated LexerNameFromID -> undefined behaviour
- movement from id -> lexer name, mostly done via LexerNameFromID + switching off corresponding compiler warning
- changed to SCI_SETILEXER from SCI_SETLEXER, SCI_SETLEXERLANGUAGE needs to be corrected, see Scintilla5Migration.html
- just commented out: SCI_LOADLEXERLIBRARY

Fix #10504, close #11419
2022-03-27 17:12:53 +02:00

76 lines
1.7 KiB
Python

# LexillaLogo.py
# Requires Python 3.6.
# Requires Pillow https://python-pillow.org/, tested with 7.2.0 on Windows 10
import random
from PIL import Image, ImageDraw, ImageFont
colours = [
(136,0,21,255),
(237,28,36,255),
(255,127,39,255),
(255,201,14,255),
(185,122,87,255),
(255,174,201,255),
(181,230,29,255),
(34,177,76,255),
(153,217,234,255),
(0,162,232,255),
(112,146,190,255),
(63,72,204,255),
(200,191,231,255),
]
width = 1280
height = 150
def drawLines(dr):
for y in range(0,height, 2):
x = 0
while x < width:
#lexeme = random.randint(2, 20)
lexeme = int(random.expovariate(0.3))
colour = random.choice(colours)
strokeRectangle = (x, y, x+lexeme, y)
dr.rectangle(strokeRectangle, fill=colour)
x += lexeme + 3
def drawGuide(dr):
for y in range(0,height, 2):
x = 0
while x < width:
lexeme = int(random.expovariate(0.3))
colour = (0x30, 0x30, 0x30)
strokeRectangle = (x, y, x+lexeme, y)
dr.rectangle(strokeRectangle, fill=colour)
x += lexeme + 3
def drawLogo():
# Ensure same image each time
random.seed(1)
# Georgia bold italic
font = ImageFont.truetype(font="georgiaz.ttf", size=190)
imageMask = Image.new("L", (width, height), color=(0xff))
drMask = ImageDraw.Draw(imageMask)
drMask.text((30, -29), "Lexilla", font=font, fill=(0))
imageBack = Image.new("RGB", (width, height), color=(0,0,0))
drBack = ImageDraw.Draw(imageBack)
drawGuide(drBack)
imageLines = Image.new("RGB", (width, height), color=(0,0,0))
dr = ImageDraw.Draw(imageLines)
drawLines(dr)
imageOut = Image.composite(imageBack, imageLines, imageMask)
imageOut.save("../doc/LexillaLogo.png", "png")
imageDoubled = imageOut.resize((width*2, height * 2), Image.NEAREST)
imageDoubled.save("../doc/LexillaLogo2x.png", "png")
drawLogo()