<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/apps/plugins/lua/include_lua/lcd.lua, branch wolf3d</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Fix red rocklib_img 32-24 bit targets</title>
<updated>2018-10-08T23:59:50+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-10-08T23:52:01+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=046cc497ad15222974201bef443109165973e3b9'/>
<id>046cc497ad15222974201bef443109165973e3b9</id>
<content type='text'>
int is an incompatible type for targets that have 32bit fb_data
need to use FB_SCALARPACK for them

Change-Id: Ib3b5ff19c54d8d1bb76af33d0538a17a71301514
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
int is an incompatible type for targets that have 32bit fb_data
need to use FB_SCALARPACK for them

Change-Id: Ib3b5ff19c54d8d1bb76af33d0538a17a71301514
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up rocklib_img</title>
<updated>2018-10-08T23:02:25+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-09-23T16:25:31+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c0682e094414d0748456d0b01000727039ff701c'/>
<id>c0682e094414d0748456d0b01000727039ff701c</id>
<content type='text'>
optimize both size and speed
fix invert for color screens

Change-Id: I7edecae32dcb3daf5b3ed984a0e5b3d463269e60
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
optimize both size and speed
fix invert for color screens

Change-Id: I7edecae32dcb3daf5b3ed984a0e5b3d463269e60
</pre>
</div>
</content>
</entry>
<entry>
<title>Lua -- Fix device hang when scroll function active on clear_screen</title>
<updated>2018-07-27T13:09:55+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-07-27T13:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=400603abdfb4ba7566e0cae8dbed9268f06716dc'/>
<id>400603abdfb4ba7566e0cae8dbed9268f06716dc</id>
<content type='text'>
I previously noticed that manually clearing the framebuffer while scroll
function was active caused lua to crash

I could reproduce in sim and on device but I thought using the plugin
supplied rb-&gt;lcd_clear_screen was immune to this issue

Unfortunately some devices exhibit this behavior with the plugin function
as well

This patch adds rb-&gt;lcd_scroll_stop() before lcd_clear_screen at lua start-up
and to the supplied include file lcd.lua

Change-Id: I9800145e5c834ea27df5db5f1bca50b0d40faa49
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I previously noticed that manually clearing the framebuffer while scroll
function was active caused lua to crash

I could reproduce in sim and on device but I thought using the plugin
supplied rb-&gt;lcd_clear_screen was immune to this issue

Unfortunately some devices exhibit this behavior with the plugin function
as well

This patch adds rb-&gt;lcd_scroll_stop() before lcd_clear_screen at lua start-up
and to the supplied include file lcd.lua

Change-Id: I9800145e5c834ea27df5db5f1bca50b0d40faa49
</pre>
</div>
</content>
</entry>
<entry>
<title>Rocklua -- Extend / Fix rliImage</title>
<updated>2018-07-23T03:13:32+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-07-23T00:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=af35d1991633f33965801dcb153a9860c4432816'/>
<id>af35d1991633f33965801dcb153a9860c4432816</id>
<content type='text'>
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 &amp; 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices

Fixed handling for 24-bit devices (32?)

-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I8a9ff0ff72aacf4b1662767ccb2b312fc355239c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 &amp; 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices

Fixed handling for 24-bit devices (32?)

-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I8a9ff0ff72aacf4b1662767ccb2b312fc355239c
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Rocklua -- Extend / Fix rliImage"</title>
<updated>2018-07-22T16:43:04+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-07-22T16:43:04+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=ef210b5fe4f72a102dcaa1f752d3022d62da8bc4'/>
<id>ef210b5fe4f72a102dcaa1f752d3022d62da8bc4</id>
<content type='text'>
This reverts commit 2daec3d3c3d84e7176a22bc073ca5530e8e44c6d.

Change-Id: I53ea1f491e3c6d6fb759f426f203f927bd26b1e9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 2daec3d3c3d84e7176a22bc073ca5530e8e44c6d.

Change-Id: I53ea1f491e3c6d6fb759f426f203f927bd26b1e9
</pre>
</div>
</content>
</entry>
<entry>
<title>Rocklua -- Extend / Fix rliImage</title>
<updated>2018-07-22T16:05:02+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-05-28T15:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=2daec3d3c3d84e7176a22bc073ca5530e8e44c6d'/>
<id>2daec3d3c3d84e7176a22bc073ca5530e8e44c6d</id>
<content type='text'>
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 &amp; 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices
-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I7b9c1fd699442fb683760f781021091786c18509
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 &amp; 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices
-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I7b9c1fd699442fb683760f781021091786c18509
</pre>
</div>
</content>
</entry>
</feed>
