Difference between revisions of "User:CL"

From Apache OpenOffice Wiki
Jump to: navigation, search
(added Mac OS X category)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
My log of the vcl bitmap and widget stuff to the QUARTZ API
+
My personal list of todo stuff and current status
  
Nick on irc.freenode.net : ChristianL
+
Nick on irc.freenode.net : CL
  
Mail : mac AT fishbyte.de
+
Mail : christian.lippka AT sun.com
  
 
== DISCLAIMER ==
 
== DISCLAIMER ==
Line 13: Line 13:
 
</pre>
 
</pre>
  
== Status updates ==
+
== Current Work ==
=== [[2006]]-[[08-18]] ===
+
  
[http://www.fishbyte.de/nativecontrols.png Screenshot of the day]
+
* Fixing issues for OOo 3.3
 +
* Embedding Video/Sounds in impress
  
Status: I optimized the AquaSalBitmap implementation. In my first emplementation I always created a [http://developer.apple.com/documentation/GraphicsImaging/Reference/CGBitmapContext/Reference/reference.html CGBitmapContext] with either 16 or 32 bit. This made it fast and easy to create CGImage for rendering. The cost was that for AquaSalBitmap::AquireBuffer I had to convert the mac format back to VCL for 1,4,8 and 24 bit formats. This also is a drawback because many SalBitmaps are not even used for drawing. For example when loading a bitmap from a file a SalBitmap with the original file format is created. Then this is copied via the Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) to have the same format as the current display. Also alpha masks are never drawn directly.
+
== Whats new in impress/draw ==
  
As a consequence, I now always store the bitmap data in a memory puffer in the format that is requested by VCL. Only if the bitmap is to be drawn on screen I create a CGBitmapContext and only convert the format if needed.
+
=== OOo 3.3 ===
  
The biggest issue at the moment besides not having any raster operations is the problem with
+
* [http://www.openoffice.org/issues/show_bug.cgi?id=48179 Backward navigation in effects in impress]
 +
* [http://qa.openoffice.org/issues/show_bug.cgi?id=57928 Format paintbrush enabled for text selection and more shapes]
  
* AquaSalGraphics::getBitmap
+
== TODO ==
* AquaSalGraphics::copyBits
+
* AquaSalGraphics::copyArea
+
  
This methods need access to the pixels on screen. This currently is used sometimes for transparency in bitmaps
+
=== cws impressmedia01 ===
and also for late 80's style scrolling speedups. Getting pixels from an on screen window on the mac would
+
require to directly access the buffer inside the graphic card.
+
  
Pavel send me this marvelous [http://lists.apple.com/archives/cocoa-dev/2005/Jun/msg02321.html link] how to get a pointer to the pixels inside the graphic card. I got that working but what I get was [http://www.fishbyte.de/gamma_problem.png this].
+
==== Feature Mails ====
  
The problem is that the mac does a gamma correctur. So what you see is what you get but not what you want.
+
Service "com.sun.star.io.comp.TempFile" got XInitialization interface and the following css::beans::NamedValue arguments
The image above shows a 32x32 area at the bottom right that is a copy of the same area at the top left.
+
You can see that it is much brighter. Thats because on second paint it again is gamma corrected. Therefore
+
the pixel information from the graphic card is not usable, unless we undo the gamma correction. But that slows
+
a slow method down even more and also we lose precision.
+
  
So I rethink about my first aproach to this problem where I did all rendering to an offscreen CGBitmapContext
+
* [optional] string LeadingChars // name of the tempfile will start with this string, followed by a counter to make the name unique
and then blitting that to the window. This worked like a charm since you can access the unaltered pixel from
+
* [optional] string Extension // extension for the tempfile. If none is given, the extension will be ".tmp"
a CGBitmapContext in contrast to a CGContext from a window.
+
* [optional] string Parent // if given, this will be the parent directory of the tempfile
 +
* [optional] boolean KillingFileEnabled // if true, the file will be deleted as soon as the instance of this service is deleted
  
There is a problem with this aproach. If we want to let the mac render native widgets we can either use the draw methods of the controls itself or the appereance manager. But both only render directly in a window. Therefore the pixels of the controls would not be present in the offscreen CGBitmapContext and could be overridden if we blit that part of the offscreen bitmap to the window.
+
=== Open ODF issues ===
  
My current idea is a mixed solution where we have a CGBitmapContext for each window and render twice. Once in the window directly and once in the offscreen bitmap. The offscreen bitmap is then only used to read pixels. This will be a significant overhead but on the other hand we will need an offscreen bitmap sooner or later to implement raster operations.
+
* draw:textarea-horizontal-align attribute has no default exported? [[http://www.openoffice.org/issues/show_bug.cgi?id=85397 issue 85397]]
  
== Open Issues ==
+
=== Frequently needed Issues ===
* implement raster operations
+
* make transparency bitmaps work
+
* implement Invert methods
+
* implement GetPixel method
+
  
== Todo ==
+
* incompatible bullets from 3.0 in 2.x => issue 91466
* Write something about raster operations
+
  
== Code fragments ==
+
=== Open ODF 1.2 features ===
  
The following code creates a AquaSalBitmap from the window area (nX,nY,nDX,nDY). Problem is that the resulting pixels are already gamma corrected. Painting them again causes a second gamma correction.
+
Auto shrink text in shapes [[http://lists.oasis-open.org/archives/office/200701/msg00025.html OASIS]]
 +
Status: Desired for OOo3.x
  
<pre>
+
Proposal: last visited page interaction [[http://lists.oasis-open.org/archives/office/200701/msg00042.html OASIS]]
CGrafPtr windowPort( GetWindowPort(mrWindow) );
+
Status: Desired for OOo3.x
LockPortBits(windowPort);
+
  
PixMapHandle thePixels( GetPortPixMap(windowPort) );
+
How to add animations for shapes on master pages [[http://lists.oasis-open.org/archives/office/200702/msg00123.html OASIS]]
LockPixels(thePixels );
+
Status: Desired for OOo 3.x
  
Rect windowBounds;
+
Proposal for rounded corners of rects (draw:corner-radius) [[http://lists.oasis-open.org/archives/office/200703/msg00206.html OASIS]]
GetWindowPortBounds ( mrWindow, &windowBounds);
+
Status: Currently not planed for OOo
  
Rect structureWidths;
+
Add glue points to 3D objects [[http://lists.oasis-open.org/archives/office/200705/msg00102.html OASIS]]
// Obtains the width of the structure region on each edge of a window.
+
Status: Currently not planed for OOo
GetWindowStructureWidths ( mrWindow, &structureWidths );
+
  
// exclude left and top window border
+
Proposal to enhance hyperlinks to support shapes [[http://lists.oasis-open.org/archives/office/200707/msg00061.html OASIS]]
nX += structureWidths.left;
+
Status: Import planned for OOo 2.4, export desired for OOo 3.x
nY += structureWidths.top;
+
  
AquaSalBitmap* pBitmap = new AquaSalBitmap;
+
<svg:desc> and <svg:title> for drawing pages [[http://lists.oasis-open.org/archives/office/200710/msg00065.html OASIS]]
ipBitmap->Create( windowBounds.right - windowBounds.left,
+
Status: Still under discussion in the TC
                  windowBounds.bottom - windowBounds.top,
+
                  GetBitCount(), GetPixRowBytes(thePixels),
+
                  reinterpret_cast< sal_uInt8* >( GetPixBaseAddr(thePixels)),
+
  nX, nY, nDX, nDY );
+
  
UnlockPixels (thePixels);
+
Layer-set per page [[http://lists.oasis-open.org/archives/office/200705/msg00132.html OASIS]]
UnlockPortBits(windowPort);
+
Status: Still under discussion in the TC
 +
 
 +
Points are integers in ODF,but floating-point in SVG [[http://lists.oasis-open.org/archives/office/200703/msg00243.html OASIS]]
 +
Status: Still under discussion in the TC
 +
 
 +
=Headless Mode Debuging=
 +
 
 +
<pre>
 +
soffice -norestore -invisible -headless macro:///Standard.Module1.Main
 
</pre>
 
</pre>
  
[[Category:Porting]]
+
<pre>
 +
Sub Main
 +
oDoc = StarDesktop.loadComponentFromURL( "file:///e:/html.odp", "_blank", 0, Array(MakePropertyValue("Hidden",True)) )
 +
 +
oDoc.storeToURL( "file:///e:/html/out.html", Array( MakePropertyValue( "URL", "file:///e:/html/out.html" ), MakePropertyValue( "FilterName", "impress_html_Export" ) )
 +
oDoc.close( True )
 +
End Sub
 +
 
 +
Function MakePropertyValue( Optional cName As String, Optional uValue ) As com.sun.star.beans.PropertyValue
 +
Dim oPropertyValue As New com.sun.star.beans.PropertyValue
 +
oPropertyValue.Name = cName
 +
oPropertyValue.Value = uValue
 +
MakePropertyValue() = oPropertyValue
 +
End Function
 +
</pre>
 +
 
 +
 
 
[[Category:Development]]
 
[[Category:Development]]
[[Category:Aqua]]
+
[[Category:Impress]]
[[Category:MacOSX]]
+
[[Category:Draw]]

Latest revision as of 16:35, 19 November 2009

My personal list of todo stuff and current status

Nick on irc.freenode.net : CL

Mail : christian.lippka AT sun.com

DISCLAIMER

This is my personal wiki. Everything I write here
may be wrong, stupid, incorrect, harmful or worse.
The views expressed on this page aren't (necessarily)
the views of Sun Microsystems Inc. 

Current Work

  • Fixing issues for OOo 3.3
  • Embedding Video/Sounds in impress

Whats new in impress/draw

OOo 3.3

TODO

cws impressmedia01

Feature Mails

Service "com.sun.star.io.comp.TempFile" got XInitialization interface and the following css::beans::NamedValue arguments

  • [optional] string LeadingChars // name of the tempfile will start with this string, followed by a counter to make the name unique
  • [optional] string Extension // extension for the tempfile. If none is given, the extension will be ".tmp"
  • [optional] string Parent // if given, this will be the parent directory of the tempfile
  • [optional] boolean KillingFileEnabled // if true, the file will be deleted as soon as the instance of this service is deleted

Open ODF issues

  • draw:textarea-horizontal-align attribute has no default exported? [issue 85397]

Frequently needed Issues

  • incompatible bullets from 3.0 in 2.x => issue 91466

Open ODF 1.2 features

Auto shrink text in shapes [OASIS] Status: Desired for OOo3.x

Proposal: last visited page interaction [OASIS] Status: Desired for OOo3.x

How to add animations for shapes on master pages [OASIS] Status: Desired for OOo 3.x

Proposal for rounded corners of rects (draw:corner-radius) [OASIS] Status: Currently not planed for OOo

Add glue points to 3D objects [OASIS] Status: Currently not planed for OOo

Proposal to enhance hyperlinks to support shapes [OASIS] Status: Import planned for OOo 2.4, export desired for OOo 3.x

<svg:desc> and <svg:title> for drawing pages [OASIS] Status: Still under discussion in the TC

Layer-set per page [OASIS] Status: Still under discussion in the TC

Points are integers in ODF,but floating-point in SVG [OASIS] Status: Still under discussion in the TC

Headless Mode Debuging

soffice -norestore -invisible -headless macro:///Standard.Module1.Main
Sub Main
	oDoc = StarDesktop.loadComponentFromURL( "file:///e:/html.odp", "_blank", 0, Array(MakePropertyValue("Hidden",True)) )
	
	oDoc.storeToURL( "file:///e:/html/out.html", Array( MakePropertyValue( "URL", "file:///e:/html/out.html" ), MakePropertyValue( "FilterName", "impress_html_Export" ) )
	oDoc.close( True )
End Sub

Function MakePropertyValue( Optional cName As String, Optional uValue ) As com.sun.star.beans.PropertyValue
	Dim oPropertyValue As New com.sun.star.beans.PropertyValue
	oPropertyValue.Name = cName
	oPropertyValue.Value = uValue
	MakePropertyValue() = oPropertyValue
End Function
Personal tools