BOS TAURUS: Questions and Suggestions

Source code related resources

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2057
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 41 times
Been thanked: 161 times
Contact:

BOS TAURUS: Questions and Suggestions

Post by srvet_claudio »

Hi all.
As suggested by Daniel Maximiliano, I created here a topic for questions and suggestions on Bos Taurus (graphic library for HMG).
Best Regards,
Claudio Soto.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Rathinagiri
Posts: 5300
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 184 times
Been thanked: 203 times
Contact:

Post by Rathinagiri »

Hi,

First of all I wish the best for this graphics library.

For me HMG is just the sweet wrapper of clipper/harbour over the bitter c/c++. Roberto's design of hiding the inner parts of the logic which the user need not know about is very successful. A person who starts using HMG doesn't need to know about Device Context for example.

So, my humble suggestion is having wrapper functions or an alternate syntax like the below:

Code: Select all

DEFINE GRAPHICSAREA of  Form1
   DRAW LINE FROM nRow, nCol TO nRow, Col COLOR { nR, nG, nB }
   DRAW CIRCLE AT nRow, nCol RADIUS nRadius
   DRAW IMAGE cPicture AT nRow, nCol
END GRAPHICSAREA

CLEAR GRAPHICS AREA OF Form1 FROM nRow, nCol TO nRow, nCol
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
srvet_claudio
Posts: 2057
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 41 times
Been thanked: 161 times
Contact:

Post by srvet_claudio »

rathinagiri wrote:So, my humble suggestion is having wrapper functions or an alternate syntax like the below:

Code:
DEFINE GRAPHICSAREA of  Form1
   DRAW LINE FROM nRow, nCol TO nRow, Col COLOR { nR, nG, nB }
   DRAW CIRCLE AT nRow, nCol RADIUS nRadius
   DRAW IMAGE cPicture AT nRow, nCol
END GRAPHICSAREA

CLEAR GRAPHICS AREA OF Form1 FROM nRow, nCol TO nRow, nCol
Thanks Rathi, very good and very wise suggestion.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
srvet_claudio
Posts: 2057
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 41 times
Been thanked: 161 times
Contact:

Post by srvet_claudio »

mol wrote:I have a question - I've read documentation of Bos Taurus, and it looks it is possible to create image file with this library. Am I right?
If yes, can you place a little sample presenting creating images?
I'm working on a little label maker and I want to build preview of label - it could be easy with BT...
Hi Marek,
Here leave you an example, I hope you find useful.
Best regards,
Claudio
Attachments
create_logo.rar
(44.6 KiB) Downloaded 1159 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
mol
Posts: 3361
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 256 times
Been thanked: 163 times
Contact:

Post by mol »

As wonderful as simple!
It will be great supplement for label generator, which I built-in my billing application.
I'll try to prepare standalone working sample.


I found and used BT_BitmapSaveFile(hBitmap, cFileName)
Working fine, but, how to output generated image to png/jpg file?
Is it possible?

Second question: Is there a method to set horizontal and vertical DPI parameter?
Many thanks, Claudio!

User avatar
srvet_claudio
Posts: 2057
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 41 times
Been thanked: 161 times
Contact:

Post by srvet_claudio »

mol wrote:It will be great supplement for label generator, which I built-in my billing application.
Hi Marek.
I'm glad you find it useful.
mol wrote:I'll try to prepare standalone working sample.
Please post here to see it.
mol wrote:One question: how to output generated image to png/jpg or bmp file?
Very easy.

BT_BitmapSaveFile (hBitmap, cFileName)
Save an image in format BMP (24 bpp) in the disk.
hBitmap: is a handle to the bitmap image.
cFileName: is the name of the file to save.

Best Regards,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
srvet_claudio
Posts: 2057
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 41 times
Been thanked: 161 times
Contact:

Post by srvet_claudio »

mol wrote: I found and used BT_BitmapSaveFile(hBitmap, cFileName)
Working fine, but, how to output generated image to png/jpg file?
Is it possible?
No, BT only saves images in BMP format (24 bpp), you would have to convert the final image into Windows Paint, etc.
mol wrote: Second question: Is there a method to set horizontal and vertical DPI parameter?
Again the answer is no :(

Regars,
Claudio.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
mol
Posts: 3361
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 256 times
Been thanked: 163 times
Contact:

Post by mol »

THX again!
I'll try to find solution...
Marek

User avatar
Rathinagiri
Posts: 5300
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 184 times
Been thanked: 203 times
Contact:

Post by Rathinagiri »

Hi Marek,

I think you can use hbfimage library.

http://freeimage.sourceforge.net/features.html

These are the features.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
mol
Posts: 3361
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 256 times
Been thanked: 163 times
Contact:

Post by mol »

I worry I'm not familiar with C language too ehough to use such a library :(

Post Reply