|
|
|
08-04-2018, 11:21 AM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
LICE: Any documentation or tutorials? How to use IBitmaps?
Are there any beginner tutorials or documentation for LICE?
Functions to draw and load images, such as LICE_FillRect and LICE_LoadSVG, seem self-explanatory, but I have no idea what the differences are between the various bitmaps (IBitmap, SysBitmap, WrapperBitmap, etc.), how to initialize and use these bitmaps, and how to get them onto the screen.
SWS's zoom tool appears to use LICE to draw a transparent rectangle on the screen, but the code is surprising complex, with lots of "#ifdef _WIN32" to separate platform-specific code.
Is it possible to use LICE to draw a line or a transparent rectangle on top of REAPER's windows in a simple, cross-platform way?
|
|
|
08-05-2018, 01:54 AM
|
#2
|
Human being with feelings
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
|
from askjf.com...
Question: could you briefly explain the purpose of various LICE_*Bitmaps? thanks [permalink]
Asked by olilarkin (144.32.156.x) on December 19 2012, 3:39pm
Reply on December 19 2012, 10:12pm:
LICE_IBitmap: abstract interface for all lice bitmaps
LICE_MemBitmap: bitmap backed by a malloc()'d buffer
LICE_SysBitmap: bitmap backed by a buffer that also has a HDC associated with it (on OSX, this implies a SWELL HDC). For these, getDC() returns non-NULL.
LICE_SubBitmap: a utility wrapper to have a subimage of another LICE_IBitmap. If you wish to clip drawing to a rectangle, you can use this.
LICE_WrapperBitmap: used if you want to wrap some foreign buffer and make it accessible for LICE functions.
|
|
|
08-05-2018, 06:51 AM
|
#3
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Thanks, this gives a glimpse into the mysteries of IBitmaps.
As far as I can see, the main use of SysBitmaps' HDC, is that Win32 functions such as BitBlt (which require DCs for the source and target) can copy the bitmap from and onto the screen.
However, I couldn't find a LICE equivalent of BitBlt. LICE_Copy and LICE_Blit only copy between LICE bitmaps. Did I overlook some LICE function?
|
|
|
08-05-2018, 07:18 AM
|
#4
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by juliansader
Did I overlook some LICE function?
|
LICE is just a library for dealing with pixels, it doesn't really have many support functions for dealing with the OS windowing system, you will have to use different facilities for that. That is, for example to get a LICE bitmap to draw on screen, you will have to have a window properly created and then use the win32 API BeginPaint, BitBlt, EndPaint functions etc. (On Windows, you may need different code for other operating systems.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 08-05-2018 at 07:33 AM.
|
|
|
08-05-2018, 08:04 AM
|
#5
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Oops, I did overlook the WDL equivalents: BitBlt is part of SWELL's GDI functions, not LICE.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:39 AM.
|