Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sex Symbols
#1
Code: (Select All)
SCREEN _NEWIMAGE(640, 480, 32)
$COLOR:32

NoSymbol 100, 100, Black, White
SLEEP
CLS
MaleSymbol 100, 100, Black, Red
SLEEP
CLS
FeMaleSymbol 100, 100, Black, Pink
SLEEP
CLS
InterSexSymbol 100, 100, Purple, Pink
SLEEP
CLS
SYSTEM

SUB NoSymbol (x AS INTEGER, y AS INTEGER, kolor AS _UNSIGNED LONG, background AS _UNSIGNED LONG)
    LINE (x, y)-STEP(150, 255), background, BF
    ThickCircle 55 + x, 100 + y, 50, 5, kolor
    ThickLine 15 + x, 135 + y, 90 + x, 65 + y, 5, kolor
END SUB


SUB MaleSymbol (x AS INTEGER, y AS INTEGER, kolor AS _UNSIGNED LONG, background AS _UNSIGNED LONG)
    LINE (x, y)-STEP(150, 255), background, BF
    ThickCircle 55 + x, 100 + y, 50, 5, kolor
    ThickLine 90 + x, 65 + y, 130 + x, 25 + y, 5, kolor
    TriangleFill 145 + x, 10 + y, 142 + x, 35 + y, 117 + x, 15 + y, kolor
END SUB

SUB FeMaleSymbol (x AS INTEGER, y AS INTEGER, kolor AS _UNSIGNED LONG, background AS _UNSIGNED LONG)
    LINE (x, y)-STEP(150, 255), background, BF
    ThickCircle 55 + x, 100 + y, 50, 5, kolor
    ThickLine 55 + x, 150 + y, 55 + x, 250 + y, 5, kolor
    ThickLine 5 + x, 200 + y, 105 + x, 200 + y, 5, kolor
END SUB

SUB InterSexSymbol (x AS INTEGER, y AS INTEGER, kolor AS _UNSIGNED LONG, background AS _UNSIGNED LONG)
    LINE (x, y)-STEP(150, 255), background, BF
    ThickCircle 55 + x, 100 + y, 50, 5, kolor
    ThickLine 55 + x, 150 + y, 55 + x, 250 + y, 5, kolor
    ThickLine 5 + x, 200 + y, 105 + x, 200 + y, 5, kolor
    ThickLine 90 + x, 65 + y, 130 + x, 25 + y, 5, kolor
    TriangleFill 145 + x, 10 + y, 142 + x, 35 + y, 117 + x, 15 + y, kolor
END SUB


SUB ThickLine (x1, y1, x2, y2, thk, kolor AS _UNSIGNED LONG)
    'draw a line of thickness thk on color klr from x1,y1 to x2,y2
    'orientation of line is set in the middle of line thickness
    STATIC tempimage AS LONG, m AS _MEM
    IF tempimage = 0 THEN tempimage = _NEWIMAGE(1, 1, 32): m = _MEMIMAGE(tempimage)
    $CHECKING:OFF
    _MEMPUT m, m.OFFSET, kolor
    $CHECKING:ON
    cang = _ATAN2((y2 - y1), (x2 - x1)) 'get the angle from x1,y1 to x2,y2
    ta = cang + _PI(.5)
    tb = ta + _PI
    tax1 = x1 + (thk / 2) * COS(ta): tay1 = y1 + (thk / 2) * SIN(ta)
    tax4 = x1 + (thk / 2) * COS(tb): tay4 = y1 + (thk / 2) * SIN(tb)
    tax2 = x2 + (thk / 2) * COS(ta): tay2 = y2 + (thk / 2) * SIN(ta)
    tax3 = x2 + (thk / 2) * COS(tb): tay3 = y2 + (thk / 2) * SIN(tb)
    _MAPTRIANGLE (0, 0)-(0, 0)-(0, 0), tempimage TO(tax1, tay1)-(tax2, tay2)-(tax4, tay4)
    _MAPTRIANGLE (0, 0)-(0, 0)-(0, 0), tempimage TO(tax2, tay2)-(tax3, tay3)-(tax4, tay4)
END SUB


SUB ThickCircle (x AS SINGLE, y AS SINGLE, radius AS SINGLE, thickness AS SINGLE, colour AS _UNSIGNED LONG)
    DIM rp AS SINGLE, rm AS SINGLE, rp2 AS SINGLE, rm2 AS SINGLE
    DIM sm AS SINGLE, rpi2 AS SINGLE, rmi2 AS SINGLE, sp AS SINGLE
    DIM i AS SINGLE

    rp = radius + thickness / 2
    rm = radius - thickness / 2
    rp2 = rp ^ 2
    rm2 = rm ^ 2
    FOR i = -rp TO -rm STEP .2
        rpi2 = rp2 - i ^ 2
        sp = SQR(rpi2)
        LINE (x + i, y)-(x + i, y + sp), colour, BF
        LINE (x + i, y)-(x + i, y - sp), colour, BF
    NEXT
    FOR i = -rm TO 0 STEP .2
        rpi2 = rp2 - i ^ 2
        rmi2 = rm2 - i ^ 2
        sm = SQR(rmi2)
        sp = SQR(rpi2)
        LINE (x + i, y + sm)-(x + i, y + sp), colour, BF
        LINE (x - i, y + sm)-(x - i, y + sp), colour, BF
        LINE (x + i, y - sm)-(x + i, y - sp), colour, BF
        LINE (x - i, y - sm)-(x - i, y - sp), colour, BF
    NEXT
    FOR i = rm TO rp STEP .2
        rpi2 = rp2 - i ^ 2
        sp = SQR(rpi2)
        LINE (x + i, y)-(x + i, y + sp), colour, BF
        LINE (x + i, y)-(x + i, y - sp), colour, BF
    NEXT
END SUB

SUB TriangleFill (x1, y1, x2, y2, x3, y3, K AS _UNSIGNED LONG)
    $CHECKING:OFF
    STATIC a&, m AS _MEM
    IF a& = 0 THEN a& = _NEWIMAGE(1, 1, 32): m = _MEMIMAGE(a&)
    _MEMPUT m, m.OFFSET, K
    _MAPTRIANGLE _SEAMLESS(0, 0)-(0, 0)-(0, 0), a& TO(x1, y1)-(x2, y2)-(x3, y3)
    $CHECKING:ON
END SUB

Homemade sex symbols which you can quickly color as you want and toss into any program wherever you'd want them. Default size for these is 150x255 pixels, but the way I suggest using them is to just draw them on a _NEWIMAGE that size, and then you can _PUTIMAGE that image wherever you want at, at whatever size you want it.

Note that these all have the same amount of whitespace to them, so that they'd overlap perfectly so they can be used as a simple image to visually indicate sex on a form or document. Even if you print them with a clear/transparent background, just keep in mind that they center *AS A WHOLE* and not as individual images. You may need to add some offsets (or trim some unneeded whitespace) for independent centering, if that's something you're interested in for your usage.
Reply


Messages In This Thread
Sex Symbols - by SMcNeill - 01-02-2024, 12:19 PM
RE: Sex Symbols - by PhilOfPerth - 01-02-2024, 11:20 PM
RE: Sex Symbols - by bplus - 01-03-2024, 12:15 AM
RE: Sex Symbols - by SMcNeill - 01-03-2024, 12:16 AM
RE: Sex Symbols - by bplus - 01-03-2024, 12:20 AM



Users browsing this thread: 1 Guest(s)