locked
shape question RRS feed

  • Question

  • How about transparence shape? It is possible? show PQL205 there is a rectangle and a triangle in a shape but it is not transparence. The backround it is not to see. Ok i can draw it with a graphic program and load the image in SB, but this is not the right way.

    Please help me.


    Best Regards Martin


    • Edited by martmen Monday, March 25, 2013 5:10 PM
    Monday, March 25, 2013 5:09 PM

Answers

  • OK, i use gimp and save the graphic with transparent background. The color are not realy good with set the opacity.

    Best Regards Martin


    • Edited by martmen Monday, March 25, 2013 7:50 PM
    • Marked as answer by martmen Monday, March 25, 2013 7:50 PM
    Monday, March 25, 2013 7:49 PM

All replies

  • You can either set a colour with transparency and draw a shape (GraphicsWindow.Fill..) using the ARGB hex format or use a shape (Shapes.Add..) and set the transparency.

    GraphicsWindow.BackgroundColor = "Red"
    GraphicsWindow.BrushColor = "#800000FF" '50% opacity
    GraphicsWindow.FillEllipse(100,100,50,50)
    GraphicsWindow.BrushColor = "Blue"
    GraphicsWindow.PenWidth = 0 'No Stroke border
    ellipse = Shapes.AddEllipse(50,50)
    Shapes.Move(ellipse,200,200)
    Shapes.SetOpacity(ellipse,50) '50% opacity

    Monday, March 25, 2013 7:02 PM
  • OK, i use gimp and save the graphic with transparent background. The color are not realy good with set the opacity.

    Best Regards Martin


    • Edited by martmen Monday, March 25, 2013 7:50 PM
    • Marked as answer by martmen Monday, March 25, 2013 7:50 PM
    Monday, March 25, 2013 7:49 PM
  • How about transparence shape? It is possible? show PQL205 there is a rectangle and a triangle in a shape but it is not transparence. The backround it is not to see. Ok i can draw it with a graphic program and load the image in SB, but this is not the right way.

    Please help me.


    Best Regards Martin


    martmen I suppose you want to do is like this. HRK412  (you need DataExtension)

     GraphicsWindow.BackgroundColor = "White"    '   Line 7  

    File=("E:\Data\Test.png")
    LDUtilities.GWCapture(File, "False")
    IMGname= ImageList.LoadImage(File)
    NewIMG=PictureTools.SetTransparencyColor(IMGname,"White")  '  transparent color setting
    NewFile="E:\Data\Eingabe zu.png"
    PictureTools.SaveImage(NewIMG,NewFile)            '  save it as a PNG file 

    IM = ImageList.LoadImage(NewFile)
    IW = ImageList.GetWidthOfImage(IM)
    IH = ImageList.GetHeightOfImage(IM)

    * I found that transparentcolor is set well if backgroundcolor is "White".

      It does not work well when other colors.

    * I tested.   ○...Navy, Yellow, Blue, Gray      ☓..... Red , khaki, Cyan

    • Edited by NaochanONEditor Tuesday, March 26, 2013 12:39 AM added test result
    Tuesday, March 26, 2013 12:03 AM
    Answerer