Hi Frank,

Frank Schönheit - Sun Microsystems Germany <[EMAIL PROTECTED]> writes:

> >     /** Sets the clip to the specified poly-polygon.<p>
> >      */
> >     void setClip( [in] XPolyPolygon2D aClipPoly ); 
> 
> can probably be saved since we have access to the XCanvas, where this
> also can be done. I think a non-rect clipping is seldom enough to
> justify removing this functionality from the simplified interface.
> 
OK.

> >     /** Set the current transform matrix.<p>
> >      */
> >     void setTransformation( [in] ::com::sun::star::geometry::AffineMatrix2D 
> > aTransform );
> 
> I'm not sure this is needed at the simplified version. I'm not even sure
> I know what this is good for in general ;)
> 
Might come in handy when you need rotated bitmaps or text.

> >     
> > //------------------------------------------------------------------------- 
> >      
> >     /** Sets a single pixel on the canvas.<p>
> >      */
> >     void drawPixel( [in] ::com::sun::star::geometry::RealPoint2D aPoint ); 
> 
> I assume that aPoint is in pixel coordinates. If so, what's the sense in
> having *real* coordinates, instead of integers? Just wondering.
> 
In concert with transformations, this does make sense. Apart from
that, it keeps the interface consistent (having real coordinates for
e.g. lines is AFAICT uncontroversial - XCanvas has anti-aliasing
implementations).

> >     /** Draws a bezier curve on the canvas.<p>
> >      */
> >     void drawBezier( [in] ::com::sun::star::geometry::RealBezierSegment2D 
> > aBezierSegment, 
> >                      [in] ::com::sun::star::geometry::RealPoint2D aEndPoint 
> > );
> 
> Sounds too ... unusual to me for inclusion in the X*Simple* interface.
> 
Well, I'm quite indifferent about that. If nobody can envision a use
case, I'll happily drop this one, too.

> >     
> > //------------------------------------------------------------------------- 
> > 
> >     /** Draws the bitmap on the canvas.<p>
> > 
> >         @param xBitmap
> >         Bitmap to render
> > 
> >         @param aLeftTop
> >         Left, top position of the bitmap on the destination canvas.
> >      */
> >     void drawBitmap( [in] XBitmap xBitmap,
> >                      [in] ::com::sun::star::geometry::RealPoint2D aLeftTop 
> > );
> 
> Lot of other APIs use css.graphic.XGraphic. Since XSimpleCanvas is going
> to be a convenience interface, there should be either an easy way to
> obtain an XBitmap from an XGraphic, or a method taking an XGraphic.
> 
Naa, lots? I count 9...
...but of course you're right, from an ease-of-use POV. Is a helper
service acceptable, that can convert an XGraphic into an XBitmap, or
alternatively render an XGraphic to an XCanvas (complementing the
GraphicRendererVCL service)?

> Also, I think having access to the state of the simple canvas might be
> necessary (sorry I previously thought and told you otherwise :), in case
> people really want to use more complex functionality at the XCanvas.
>
OK - that would give three additional methods (two out, five in):

getCurrentFont(), getCurrentPenColor(), getCurrentFillColor(),
getCurrentClipRect() and getCurrentTransformation()

Cheers,

-- Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to