I write a html text editor using pango, but I don't know how to display image in html text.



Hello everyone:  
      for example:


     string = "abcdefg aaaaaaaaa aaaaaaaaaa aaaaa aaa aaaa aaa ssss sss sss sss sssss ssss <img src="" class="moz-txt-link-rfc2396E" href="http://www.tutorialspoint.com/images/html.gif">"http://www.tutorialspoint.com/images/html.gif" width="75" height="75" alt="HTML Tutorial" align="right"> zzzzz zzzzza aaaaaaa aaaaaa aaaaaaa aaaaaaa aaaaaaaa."
       display:
               

          string = "abcdefg aaaaaaaaa aaaaaaaaaa aaaaa aaa aaaa aaa ssss sss sss sss sssss ssss <img src="" class="moz-txt-link-rfc2396E" href="http://www.tutorialspoint.com/images/html.gif">"http://www.tutorialspoint.com/images/html.gif" width="75" height="75" alt="HTML Tutorial"> zzzzz zzzzza aaaaaaa aaaaaa aaaaaaa aaaaaaa aaaaaaaa."
       display:
               

          In the first conditions, I must compute the width of space beside the picture, compute the last glyph upon the picture and the first glyph below the picture, and separate the string to three layouts. It is too complex, so I select the 2nd condition. I regard the picture as a big glyph, but I don't know how to display the picture (call my function "draw_picture" the same as "draw_glyph" ) in pango. 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]