Is anyone any good at icon design

now to find a UNICODE character for “nil”… I used &u2349 and flipped it

&u00D8 should do the trick. Or you use a code font where the 0 (zero) has a diagonal stroke in it.

1 Like

HA! it does… wonder why I couldn’t find that :slight_smile:
notnil

Please try it with a zero, as I mentioned in my previous post. I think it would be more fitting in this context.

notnil

1 Like

Personally I like the second one (with the zero) better. What the first one uses is a Swedish/Scandinavian letter an is pronounced similarly to the German “ö”. In Swedish it’s even a word(!) and means “island”.

The “zero” is what the logo really wants to express: if not zero/null/nil.

But maybe that’s just the typesetter in me…

I like the shape of the second one better as well :slight_smile:
There’s something “more right” about it

should the parend () be raised a bit?

I really like the second one too @DaveS. I agree, perhaps lift the parentheses

this was done with a brute-force Xojo app… and probably still needs to be tweaked a bit
it had to do one char at a time in order to adjust the Ycoor for the ( )

it can be “scaled” by changing the value of “size”

// in a PAINT EVENT

Dim s As String="if(!"+&Ud8+")"
s="if(!0"+&u338+")"
//s="if(!0)"
Dim w As Integer
Dim h As Integer
Dim size As Integer=200
//
Dim border As Integer=size*0.30
//
g.ForeColor=Color.white
g.fillrect 0,0,g.Width,g.Height
g.TextSize=size
g.Bold=True

g.ForeColor=RGB(254,254,254)
w=g.stringwidth(s)+border
h=g.TextHeight+border
g.fillRoundRect(0,0,w,h,border,border)
g.ForeColor=RGB(14,115,192)
g.PenWidth=size/10

g.DrawRoundRect(0,(g.penwidth/2),w+g.PenWidth,h,border,border)

//g.drawstring s,border,(size*0.15)+g.TextAscent

Dim x As Integer=((w+g.PenWidth)-g.StringWidth(s))/2
Dim y As Integer=g.textascent+(h-g.TextHeight)/2
Dim i As Integer
Dim c As String
Dim y1 As Integer
//g.ForeColor=Color.red
For i=1 To Len(s)
  y1=y
  //g.bold=True
  c=Mid(s,i,1)
  If c="0" Then 
    c="0"+&u338
    i=i+1
  End If
  If c="(" Or c=")" Then 
    y1=y1-(0.075*size)
  End If
  g.DrawString c,x,y1
  
  x=x+g.StringWidth(c)
Next i

1 Like

This actually would have been a good one to test out my xojoscript drawing functions with

damn … too slow on the draw :slight_smile:

I love the idea of drawing the forum’s logo with Xojo. Very cool!

I’ve tweaked your code a bit @DaveS, mainly to make it API 2.0 compatible (I’m trying to use API 2.0 exclusively) and also to annotate some of the magic numbers you’ve used:

// Tweak these constants to change the logo's appearance.
Const TEXT_COLOR = &c0e73c0
Const BACKGROUND_COLOR = &cfefefe
Const BORDER_COLOR = &c0e73c0
Const LOGO_TEXT_SIZE = 200
Var logoText As String = "if(!0" + &u338 + ")"

Var w, h As Integer
Var borderThickness As Integer = LOGO_TEXT_SIZE * 0.30

g.FontSize = LOGO_TEXT_SIZE
g.Bold = True

w = g.TextWidth(logoText) + borderThickness
h= g.TextHeight + borderThickness

g.PenSize = LOGO_TEXT_SIZE / 10

// Draw a filled rounded rectangle background.
g.DrawingColor = BACKGROUND_COLOR
g.FillRoundRectangle(0,(g.PenSize/2), w + g.PenSize, h,borderThickness, borderThickness)

// Draw the outline of a rounded rectangle to act as the border.
g.DrawingColor = BORDER_COLOR
g.DrawRoundRectangle(0, (g.PenSize/2), w + g.PenSize, h, borderThickness, borderThickness)

Var x As Integer = ((w + g.PenSize) - g.TextWidth(logoText)) / 2
Var y As Integer = g.FontAscent + (h - g.TextHeight) / 2
g.DrawingColor = TEXT_COLOR
For i As Integer = 0 To logoText.Length
  Var y1 As Integer = y
  Var c As String = logoText.Middle(i, 1)
  If c = "0" Then 
    c = "0" + &u338
    i = i + 1
  End If
  If c = "(" Or c = ")" Then 
    y1 = y1 - (0.075 * LOGO_TEXT_SIZE)
  End If
  g.DrawString(c, x, y1)
  
  x = x + g.TextWidth(c)
Next i

What do people reckon - shall we change the logo to this one?

3 Likes

FYI… I used a background of &cFEFEFE instead of &cFFFFFF so I could if necessary run it thru a masking program I have the takes the &cFFFFFF and moves them to the MASK layer … .in case you wondered :slight_smile:

How about drawing it in XojoScript ?

here y’all go

It uses “API 1 style”

1 Like

nice norm!

maybe the logo should be a forever changing shape :slight_smile:

yeah i’ve got some weird glitch with DrawString not liking the last couple characters I need to fix

and there’s no graphics.clip - yet :stuck_out_tongue:

EDIT : ah right String.MID doesnt work right :slight_smile:
This is classic “no extension methods” API 1.0 so had to use mid(logoText,i,1) and then things draw fine

Ah - that makes sense. I changed the code. It’s a good idea.

That’s just plain freakin’ awesome. I’m gonna tinker with this

I may need to refactor a bit to make it so Graphics.Clip works the way I want
Should be doable

But this is a lot like what Geoff showed in his video of how a custom class could draw in the IDE :slight_smile:
The IDE just need to provide the context and off you go

1 Like