Graphics

Printing text

I am making new gadget class. I have a text related issue:

Imagine a button gadget with a locked width. Then the user changes the text to something longer than the button is wide. How do I clip the text off at the end of the button (inner width)? So it doesn't keep printing past the gadget.

IGraphics->Text() would be great if it printed by PIXEL length instead of CHARACTERS length.

My box is not static,though. The width/height can change with window resizing.

Forums: 

Use of minterm

Hello,
I would want to play with minterm in my graphics tests.
Reading the autodoc and .h file (I don't remember the name now), it is a bit complicated without help.
I mean those ABN, BAN or whatever are very cryptic to me.
Any info?

Forums: 

Fastest way to erase a bitmap

Hello there.
For AmigaOS4.1 last update.

I would want to find the best and fastest way to clear a (big like 1600x1050) bitmap.
For the moment I use BltClear from graphics library.
To use it I call LockBitmap before.

First, I have found that BltClear is not fast I supposed.
Second, it clears bitmap with 0. What could I do if I want to use a ARGB value?

Thanks for reading.

Forums: 

BltBitMapRastPort() problem

I got new errors in the Gui4Cli source i did not touch much last years.
for the BltBitMapRastPort() function

error: 'ABC' undeclared (first use in this function)
error: 'ABNC' undeclared (first use in this function)
for the line
BltBitMapRastPort(img->bm, 0, 0, &rp, MinX, MinY + hpos, img->bmh.bmh_Width, ht, MINT); /

Forums: 

p96LockBitMap freezes the system

Hello to all.
I am trying to make Comicami work under AmigaOS 4.1upd6. I use th P96 library for the manipulation of the images, but I stuck at the IP96->p96LockBitMap, which crashes and lock my system. If I remark this function and a few of the rest that use the lock, then the program doesn't crash at all, no matter how many times I load it. Does anyone have a clue on what is going on?

Below is the function that uses it.

Forums: 

PNG2C

Has anyone used PNG2C from OS4Depot? The author doesn't give an example on how to use it in your program. Is there a newer program than this? I would like to then take that C code and make a BitMapClass object with it. 24/32bit is a must.

Forums: 

Pages

Subscribe to RSS - Graphics