Jump to content

Need some help with Graphic


Recommended Posts

Hi,

I'm using two graphics, $bg1 and $bg2, to draw some things.

I now have the following problems/questions:

1. How can I draw a rectangle/circle that's filled in?

I don't see how to do that...

2. I use the following code:

GUICtrlSetGraphic($bg1, $GUI_GR_COLOR, $color)
    GUICtrlSetGraphic($bg1, $GUI_GR_ELLIPSE, $pixX + 10, $pixY + 10, 20,20)
    GUICtrlSetGraphic($bg1, $GUI_GR_MOVE, $pixX + 20, $pixY + 5)
    GUICtrlSetGraphic($bg1, $GUI_GR_LINE, $pixX + 20, $pixY + 15)oÝ÷ Ûbr¬q©eyÛhëaz¼"¶®¶­s`uT7G&Å6WDw&2b33c¶&s"Âb33c´uTôu%ôÄäRÂà uT7G&Å6WDw&2b33c¶&s"Âb33c´uTôu%ôÄäRÂà uT7G&Å6WDw&2b33c¶&s"Âb33c´uTôu%ôÄäRÂÃoÝ÷ Øz0z÷«Â§z÷«!Æ¥Øb²Ø^)Þv¶°x"Mún
¬µªí³^­ëazX§z)ôߦàÕéÝyÔájج¶¥w¬j·­¬'Â+a}7é¸6jwn²)àÓ~g(¢·b«^±»­¶¯j[²íë-j»b(¢·b«^±ªÞ¶¨ë®´ß¦àÖ'¢Ó~©þÛM7ê±cíyþ"+y©eÉÚ'ßÛlyèhÂØZ¶©¥éìjËaz·¢²z4ß¡ dL9Q¢½7é¸6Ý«­¢+ÙÕ¹}AÕÑ   ½Ð ÀÌØíà°ÀÌØíä°ÀÌØí¥È°ÀÌØíÉÁ ¤(%}ÉÝ   ½Ð ÀÌØí½ÑA½ÍlÁt°ÀÌØí½ÑA½ÍlÅt°ÀÌØí¥È°Áá°ÀÌØíÉÁ ¤(%}ÉÝ   ½Ð ÀÌØíà°ÀÌØíä°ÀÌØí¥È°ÁàÀÀÀÁ°ÀÌØíÉÁ ¤($ÀÌØí½ÑA½ÍlÁtôÀÌØíà($ÀÌØí½ÑA½ÍlÅtôÀÌØíä(%U%
ÑɱMÑÉÁ¡¥ ÀÌØíÉÁ °ÀÌØíU%}I}IIM ¤)¹Õ¹(()Õ¹}ÉÝ ½Ð ÀÌØíà°ÀÌØíä°ÀÌØí¥È°ÀÌØí½±½È°ÀÌØíÉÁ ¤($ÀÌØíÁ¥á`ôÀÌØíà¨ÐÀ($ÀÌØíÁ¥ádôÀÌØíä¨ÐÀ(%U%
ÑɱMÑÉÁ¡¥ ÀÌØíÉÁ °ÀÌØíU%}I}
=1=H°ÀÌØí½±½È¤(%U%
ÑɱMÑÉÁ¡¥ ÀÌØíÉÁ °ÀÌØíU%}I}11%AM°ÀÌØíÁ¥á`¬ÄÀ°ÀÌØíÁ¥ád¬ÄÀ°ÈÀ°ÈÀ¤(%U%
ÑɱMÑÉÁ¡¥ ÀÌØíÉÁ °ÀÌØíU%}I}5=Y°ÀÌØíÁ¥á`¬ÈÀ°ÀÌØíÁ¥ád¬Ô¤(%U%
ÑɱMÑÉÁ¡¥ ÀÌØíÉÁ °ÀÌØíU%}I}1%9°ÀÌØíÁ¥á`¬ÈÀ°ÀÌØíÁ¥ád¬ÄÔ¤)¹Õ¹

When I call _PutBot with $bg1 as the $graph variable, it works fine, drawing over the old picture in $bg1 and drawing a new one.

When I call it with $bg2, it works too (as expected in $bg2).

However, when I call them one after the other, it works fine in $bg1, but fails to draw over the $bg2 one in white - it just draws an extra blue one in $bg2.

What am I doing wrong here?

4. Whenever I use $GUI_GR_REFRESH, everything I've ever drawn in the Graphic appears, then disappears as it is re-drawn over. This is slightly annoying, is there a way to prevent it? I don't want to redraw everything I've ever drawn, I just want the last thing I've drawn to appear...

Thanks for any help,

--WhiteAvenger

Edited by WhiteAvenger
Link to comment
Share on other sites

I'm not an expert with graphics, but you'll find most of your graphics questions answered in the GDIPlus UDF in the help file.

I might try _GDIPlus_GraphicsDrawRect() to draw the rectangle and _GDIPlus_GraphicsClear() to fill it in with a specific color

[u]You can download my projects at:[/u] Pulsar Software
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...