PDA

View Full Version : Photography / unicode related -- the chemicals. (a calculator written in ThinBasic)



RobbeK
06-03-2014, 18:36
OK, first post ...

As I fabricate all photography related chemicals myself, this is a handy tool (attached).

(needs a font capable of subscript numbers, included and under Win7 I think the program will ask to install this font - (from disk).

I converted this from a Lisp prog , written loooong time ago.

questions : is subscript possible with unicode fonts in Thinbasic ???

best Rob
(http://www.ipernity.com/home/294723)

Petr Schreiber
06-03-2014, 23:16
Hi Rob,

again, very nice proggie! I think Unicode is one of the areas where ThinBASIC could improve.
As PowerBASIC does have unicode string support, I think it should be possible to integrate it to TB as well.

Moving to unicode would ideally mean unicode source files, to be able to insert Unicode literals and so on.

Maybe there is way to achieve it right now via some kind of hack, I will check during weekend.


Petr

Petr Schreiber
09-03-2014, 21:15
Hi Rob,

I investigated a bit and so far no luck producing unicode subscript.

Does it mean dead end?

In ThinBASIC, never! :)

I prepared little OOP helper for you, used like:


Uses "UI"

#INCLUDE "uSubscriptWriter.tBasicU"

DWord hCanvas = Canvas_Window("Subscript", 100, 100, 640, 480)
Canvas_Attach(hCanvas, 0, TRUE)

Dim sw As SubscriptWriter
sw.Init("Courier New", 14, %CANVAS_FONTSTYLE_NORMAL)

sw.Print("Speed")
sw.PrintSub("Passenger")
sw.Print(" = Speed")
sw.PrintSub("Vehicle")

Canvas_Redraw
Canvas_WaitKey


Find the unit in the attachement please.


Petr

RobbeK
10-03-2014, 20:47
! great idea to adapt it to a canvas ....

gave me another idea -- retro style as we used to program displays in the 70s (before the monitor).

Every segment gets a unique power of 2 value in this way they give one to one compositions.

A font-less system, rural & antique but it works ....
(only numbers for the moment , made this rather quickly)

best Rob -- thanks again
(this is not the way the code should be built - the intention is doing the decoding by binary and masks - .. 00000 00001 00010 etc ....
so the first segment has to turned on if n b.and 1 is True , the second (too) if n b.and ...00010 is true ... etc...

(there are 10 types of people in this world, those who understand binary and those who dont ;-)

RobbeK
15-03-2014, 13:53
A collage I made a few years ago.
The idea was to combine computer language with photography.
GFA compiler , the main loop that ends the program when the object in focus is destroyed.


(it's soft nude , based on those popular Paris postcards -- if you don't like nudes, don't look (it seems such people exist))
http://www.ipernity.com/doc/294723/31089717/sizes


best (the definition of the dream)

Rob

Petr Schreiber
15-03-2014, 17:20
Hehe,

no problem with nudity in this form, really unusual combination :D


Petr

RobbeK
15-03-2014, 21:32
Hi Petr,

Reading the Me <> This , I suddenly remembered I made something related ;-)

best Rob
(Palach .. Icon/Person dilemma, probably only a few survivers can tell, maybe ).
It sometimes is difficult , when I studied in Ghent (I'm Flemish) one day there were some lectures by Pachman (A CZ chess grandmaster - I had some books from his hand ) , in my infinite stupidity I thought he was going to talk about chess -- but he found exile in Germany and his lectures were about his semi-fascistic ideas ...