Results 1 to 5 of 5

Thread: About CL_Draw question?

  1. #1

    Default About CL_Draw question?

    CL_Draw has only 9 members operations. Is there anyway to have
    each of those functions and CL_Gradient with the CL_Point, CL_Rect, CL_Color?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    What do you mean?

    at the moment we have:
    Code:
    	static void gradient_fill(CL_GraphicContext gc, float x1, float y1, float x2, float y2, const CL_Gradient &color);
    	static void gradient_fill(CL_GraphicContext gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Gradient &gradient);
    	static void gradient_fill(CL_GraphicContext gc, const CL_Rectf &rect, const CL_Gradient &gradient);
    etc
    Every option possible?

  3. #3

    Default

    Quote Originally Posted by rombust View Post
    What do you mean?

    at the moment we have:
    Code:
    	static void gradient_fill(CL_GraphicContext gc, float x1, float y1, float x2, float y2, const CL_Gradient &color);
    	static void gradient_fill(CL_GraphicContext gc, const CL_Pointf &start, const CL_Pointf &end, const CL_Gradient &gradient);
    	static void gradient_fill(CL_GraphicContext gc, const CL_Rectf &rect, const CL_Gradient &gradient);
    etc
    Every option possible?
    What I mean is that CL_Gradient should also have CL_Color as overload.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Quote Originally Posted by Eng C. Born View Post
    What I mean is that CL_Gradient should also have CL_Color as overload.
    CL_Draw::gradient_fill draws a rectangle with colours changing at a linear gradient..

    The colours are specified using CL_Gradient:
    Code:
    http://www.clanlib.org/docs/clanlib-2.0.0/reference/CL_Gradient.CL_Gradient.html
    	CL_Gradient::CL_Gradient();
    
    	CL_Gradient::CL_Gradient(
    		const CL_Colorf & top_left,
    		const CL_Colorf & top_right,
    		const CL_Colorf & bottom_left,
    		const CL_Colorf & bottom_right);
    
    	CL_Gradient::CL_Gradient(
    		const CL_Colorf & first_color,
    		const CL_Colorf & second_color);
    http://www.clanlib.org/docs/clanlib-...ient_fill.html

    CL_Draw::gradient_fill() should work with GL and GDI target, but currently does not work with the SDL target (at the moment)

    Do you mean, to have CL_Colorf instead of CL_Gradient (that would add 6 extra constructors)?

  5. #5

    Default

    Quote Originally Posted by rombust View Post
    CL_Draw::gradient_fill draws a rectangle with colours changing at a linear gradient..

    The colours are specified using CL_Gradient:
    Code:
    http://www.clanlib.org/docs/clanlib-2.0.0/reference/CL_Gradient.CL_Gradient.html
    	CL_Gradient::CL_Gradient();
    
    	CL_Gradient::CL_Gradient(
    		const CL_Colorf & top_left,
    		const CL_Colorf & top_right,
    		const CL_Colorf & bottom_left,
    		const CL_Colorf & bottom_right);
    
    	CL_Gradient::CL_Gradient(
    		const CL_Colorf & first_color,
    		const CL_Colorf & second_color);
    http://www.clanlib.org/docs/clanlib-...ient_fill.html

    CL_Draw::gradient_fill() should work with GL and GDI target, but currently does not work with the SDL target (at the moment)

    Do you mean, to have CL_Colorf instead of CL_Gradient (that would add 6 extra constructors)?
    CL_Gradient::CL_Gradient(
    const CL_Color & top_left,
    const CL_Color & top_right,
    const CL_Color & bottom_left,
    const CL_Color & bottom_right);

    CL_Gradient::CL_Gradient(
    const CL_Color & first_color,
    const CL_Color & second_color);

    and CL_Draw::gradient_fill should have like this :

    static void CL_Draw::gradient_fill(
    CL_GraphicContext gc,
    const CL_Rect & rect,
    const CL_Gradient & gradient);

    and CL_Draw::fill should also have
    static void CL_Draw::fill(
    CL_GraphicContext gc,
    const CL_Rect & rect,
    const CL_Color & color);

    Another word, it will be nice to have both int and float parameters.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •