freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] bitmap storage


From: Alexander Weber
Subject: Re: [Devel] bitmap storage
Date: Sat, 28 Jul 2001 13:55:29 +0200

Hi Matthew and all the others,
thanks for your information... Is the first point you mentioned
also valid for FT2? I did it the same way you told with FT 1.3, but now
I am changing to FT2 and as I understand FT2, the whole memory
allocation and management is done by the engine,  ----  as FT_Load_Char()
for example does not allow to provide a block of memory to write to
as it allocates a block by itself...

The second point does work, I am using it since now, but it wastes a large
amount of memory (especially when rendering for printing)

Can anybody tell me more about the 3rd point? Does anybody know
whether it is possible in FT2? I searched the whole FT2-documenation
for something like "pad" or "align" and did not find anything...

alex

----- Original Message ----- 
From: "Feinberg, Matthew" <address@hidden>
To: "'Alexander Weber'" <address@hidden>; <address@hidden>
Sent: Saturday, July 28, 2001 2:33 AM
Subject: RE: [Devel] bitmap storage


> Actually, you shouldn't need to modify the engine.  There are a couple
> of options:
> 
> -  Make a bigger bitmap than you need, so it aligns to 4 bytes, but when
> you call BitBlt(), don't copy the whole bitmap, leave off the extra
> pixels.
> 
> -  Allocate memory for a bitmap directly using GlobalAlloc() or malloc()
> or whatever, have FreeType draw into that memory, then copy it into the
> windows bitmap yourself using memcpy() once for each row.
> 
> -  I don't remember off the top of my head, but FreeType may allow you
> to specify per-row padding in a bitmap for alignment purposes.
> 
> --Matthew
> 
> -----Original Message-----
> From: Alexander Weber [mailto:address@hidden
> Sent: Friday, July 27, 2001 4:14 PM
> To: address@hidden
> Subject: [Devel] bitmap storage
> 
> 
> Hi,
> as the stupid windoze-API "CreateDIBitmap" requires every row to be a
> multiple of 4 bytes
> I want to modify the engine according to this requirement.
> 
> My questions are the following:
> * How big would the effort be?
> * Where (exactly: which files, in which functions)would
> I have to make the modifications?
> 
> cheers, alex
> 
> 
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel
> 
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]