BOS TAURUS: Questions and Suggestions

Source code related resources

Moderator: Rathinagiri

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

BOS TAURUS: Questions and Suggestions

Post by srvet_claudio » Tue Nov 06, 2012 1:27 am

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: 5085
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 91 times
Been thanked: 105 times
Contact:

Post by Rathinagiri » Tue Nov 06, 2012 4:09 am

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: 1913
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 92 times
Contact:

Post by srvet_claudio » Tue Nov 06, 2012 4:45 am

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: 1913
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 92 times
Contact:

Post by srvet_claudio » Wed Nov 07, 2012 12:34 pm

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 1033 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

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

Post by mol » Thu Nov 08, 2012 6:31 am

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: 1913
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 92 times
Contact:

Post by srvet_claudio » Thu Nov 08, 2012 12:58 pm

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: 1913
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 92 times
Contact:

Post by srvet_claudio » Thu Nov 08, 2012 1:08 pm

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: 2714
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 82 times
Been thanked: 27 times
Contact:

Post by mol » Thu Nov 08, 2012 2:07 pm

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

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

Post by Rathinagiri » Thu Nov 08, 2012 3:05 pm

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: 2714
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 82 times
Been thanked: 27 times
Contact:

Post by mol » Thu Nov 08, 2012 5:39 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest