Drawing on a visual object

Hi everyone,
Is it possible to draw on visual objects in java 3d.
e.g. Could the user draw a shape on a sphere?
thanks

I'm not sure if this is what you're after, but you can
- create an offscreen image using "createImage(int width, int height)" method of a Component , then
- obtain the graphics context of the offscreen image using "getGraphics()",
- you can then draw onto the offscreen image using the graphics context.
hope that helps. =)

Similar Messages

  • Group feature in j3d ? regrouping visual objects

    Is it possible in Jva3D to regroup visual objects?
    I mean two leaves (i.e.geometric form of the same
    branchgroup or different branchgroups?) are selected
    by the mouse and then become the same object.
    For instance , like the group feature in drawing Powerpoint.
    Any idea ?
    Thanks
    spytox

    FYI - This regression has been filed here: http://bugs.adobe.com/jira/browse/SDK-31989

  • AddAdoCommand problems from visual objects

    Post Author: powerneet
    CA Forum: Other
    I'm trying to use the AddAdoCommand from Visual Objects.
    The code is simple:
    cConnectString:=IVarGet(oTableLink,#connectbufferstring)
    // resolves in : Provider=SQLOLEDB;;Data Source=(local);;Initial Catalog=200;;User ID=;;Password=;;Integrated Security=-1;;Use DSN Default Properties=0;;Locale Identifier=1043;;Connect Timeout=15;;General Timeout=0;;OLE DB Services=-5;;Current Language=;;Auto Translate=-1;;Initial File Name=;;Use Encryption for Data=0;;Replication server name connect option=;;Tag with column collation when possible=0
    this works: oDatabase:AddOLEDBSource(cConnectString,"bedryf")
    this fails: oDatabase:AddAdoCommand(cConnectString,"select * from bedryf")
    The profiler shows:
    exec Provider=SQLOLEDB;;Data Source=(local);;Initial Catalog=200;;User ID=;;Password=;;Integrated Security=-1;;Use DSN Default Properties=0;;Locale Identifier=1043;;Connect Timeout=15;;General Timeout=0;;OLE DB Services=-5;;Current Language=;;Auto Translate=-1;;Initial File Name=;;Use Encryption for Data=0;;Replication server name connect option=;;Tag with column collation when possible=0
    select * from Provider=SQLOLEDB;;Data Source=(local);;Initial Catalog=200;;User ID=;;Password=;;Integrated Security=-1;;Use DSN Default Properties=0;;Locale Identifier=1043;;Connect Timeout=15;;General Timeout=0;;OLE DB Services=-5;;Current Language=;;Auto Translate=-1;;Initial File Name=;;Use Encryption for Data=0;;Replication server name connect option=;;Tag with column collation when possible=0
    Please help me, i'am getting .......

    Thank you Gaurav for pointing me in the right direction. There was some debate in the blogs as to which data transferring method (amfphp, json, or xml) was best. See
    http://blogs.adobe.com/mikepotter/2006/07/php_and_flex_js.html
    and
    http://www.5etdemi.com/blog/archives/2006/12/clearing-the-fud-on-amfphps-speed-versus-json -and-xml/
    I used json yesterday
    php:  json_encode(array($p1, $p2));   // observation: you only have to encode once as opposed
                                          // to using amf on each array...
    FB:   private var jsonD:JSONDecoder = new JSONDecoder();
          var jsonString:String = {{{return result from service call}}}
          myPeople:ArrayCollection = jsonD.decode(jsonString, services.personservice.Person);
    Note that in FB you can use the services.personservice.Person class as an optional argument in the jsonD.decode function. This class can be automatically generated using FB's built-in data service's panel when you try to configure the return type (as I described above). The json data should unserialize correctly with Cars objects automagically created and everything (a huge time saver!!).
    It worked for me, though I'm not sure how deep the unserialization process is capable of going (objects within objects w/in objects, for example). Also I had some trouble with adobe's jsonDecoder; it had trouble eating (uhm parsing) hollow objects (i.e. objects with null properties), whereas the php_encode / php_decode handled these objects w/o fail.
    Anyway, will be reading up on amf. Tanx again Gaurav,
    - e

  • Best way to draw thousands of graphic objects on the screen

    Hello everybody, I'm wanting to develop a game where at times thousands of graphic objects are displayed on-screen. What better way to do this in terms of performance and speed?
    I have some options below. Do not know if the best way is included in these options.
    1 - Each graphical object is displayed on a MovieClip or Sprite.
    2 - There is a Bitmap that represents the game screen. All graphical objects that are displayed on screen have your images stored in BitmapData. Then the Bitmap that represents the game screen copies for themselves the BitmapData of graphical objects to be screened, using for this bitmapData.copyPixels (...) or BitmapData.draw  (...). The Bitmap that represents the screen is added to the stage via addChild (...).
    3 - The graphical objects that are displayed on screen will have their images drawn directly on stage or in a MovieClip/Sprite added to this stage by addChild (...). These objects are drawn using the methods of the Graphics class, as beginBitmapFill and beginFill.
    Recalling that the best way probably is not one of these 3 above.
    I really need this information to proceed with the creation of my game.
    Please do not be bothered with my English because I'm using Google translator.
    Thank you in advance any help.

    Thanks for the information kglad. =)
    Yes, my game will have many objects similar in appearance.
    Some other objects will use the same image stored, just in time to render these objects is that some effects (such as changing the colors) will be applied in different ways. But the picture for them all is the same.
    Using the second option, ie, BitmapDatas, which of these two methods would be more efficient? copyPixels or draw?
    Thank you in advance any help. =D

  • Cant tell when Merge drawing model vs. Object drawing model

    I keep drawing shapes on the same layer, overlapping them,
    and then trying to delete one of the shapes to cut a shape out of
    the first. This does not work automatically as Help says it does, I
    have to go to "Modify > Combine Objects > Union" to merge
    them, THEN I can cut my shape out. When is this supposed to occur
    "automatically"? How am I supposed to know what mode I'm in?

    sifupeter,
    > I keep drawing shapes on the same layer, overlapping
    > them, and then trying to delete one of the shapes to cut
    > a shape out of the first. This does not work
    automatically
    > as Help says it does
    It depends entirely on what mode you're in. ;) When you have
    a drawing
    tool selected (Rectangle, Pencil, etc.), take a look at the
    "circle" button
    near the "magnet" button at the bottom of the Tools panel.
    Hover over the
    circle button to see the "Object Drawing" tool tip. When that
    button is
    pressed in, you're in Object Drawing mode; when it's not
    pressed in, you're
    not.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Unable to insert/add new item in LEGEND visual object

    I'm currently working in Solution manager and I tried to add a legend into one of my view of my web dynpro application.
    Unfortunatly, the Option 'INSERT ITEM' in the context menu is not visible/ not available.
    Is it because of Solution manager or is there any blocking "thing" that avoid me to do that ?
    Thanks for your help.
    Regards
    Stephan

    No help ?

  • Export/Save As...Visual objects in WPF/XAML to image format like *.png or *.jpeg

    Hi,
    I am working on getting the content of a Canvas i.e. the children arranged on Canvas as nodes and edges of a dependency graph representing certain relationship. I want to export or "Save As..." image format. I achieved it successfully, with some
    trial and error, as it was first time for me to write such functionality. However, I have encountered couple of issues; I am using RenderTargetBitmap
    with dpix and dpiy as 256.
    Issues:
     The image shrinks on render as image with PixelFormats.Pbgra32;
    though it scales well in windows image viewer.
    If I try to obtain bounds as Rect bounds = VisualTreeHelper.GetDescendantBounds(content);
    and utilize the width and height in RenderTargetBitmap to avoid clipping of image; with certain multiplier - I get system out of memory exception; the multiplier is around 2.67; any value greater than 3 runs into exceptions.
    Please provide me any reference or any other way of achieving the export.
    Thank you,
    Best Regards,
    Mandeep

    Hello Atwal1,
    Since this issue is related with WPF, I move it to the WPF forum there WPF experts will help you. The current forum is for .NET class libraires.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • TableCellRenderer, drawing to the object

    i have hit a bit of a snag and need a recommendation......
    i'm building an application that will allow the user to drag office cubicles onto a layout and move them around, etc. the list of available cubicles (sizes and such) are stored in a JTable and displayed on the left side as a single column.
    The issue i have run into is in my cell renderer.
    The user is able to create custom cubicle sizes/shapes in a seperate editor, these cubicles are then added to the table, i would like to be able to render scaled down versions of the cubicles inside the cells in the JTable as pictoral icons for each cube. inside my cell renderer class when i override the getTableCellRendererComponent method i am able to set the text, or apply an Icon but i can not get a Graphics hook to do any kind of drawing, which is what i need to do to create the scaled image of the cubicle. so i guess my question is, is it possible to draw to the TableCellRenderer object before returning it? since it is possible to write text or an icon and set the background color i am lead to believe that a Graphics context exists for the object although calls to getGraphics return null.
    thanks for any insight.
    -xian
    another solution is to store a scaled icon object in each Cubicle object but again i need to create the Icon dynamically, is there an easy facility to draw to an Icon object?

    thx for the response, i did give this a try, however since i am returning "this" it would only work for one cell, to use the paint method i would have to create a seperate instance of my cell renderer for every cubicle size and because the user can add additional cubicle sizes/shape at any time it is impossible for me to create the paint methods at run time....
    i'm starting to think that pre-drawing the cubicle thumbnail to an ImageIcon and applying that to the JLabel may accually be the easiest way to go.
    thanks!
    -xian

  • Drawing objects not visible

    I am just starting flash today.  And the first thing I am doing is to draw a shape.  Object Drawing is selected.  I have clicked the rectangle shape tool, have selected a color and fill.  I drag across the stage and a rectangular line appears, but when I let off the keys, it dissapears.  No shape, no stroke, no fill.  Invisible, gone, disappeared.  What the heck am I doing wrong?  Alright everyone, stop laughing, and thanks in advance!

    Gosh, you guys are working hard to help.
    I followed all three steps (which is what I have been doing), but when I let go of the left mouse button, the cursor and thin outline of the rectangle disappear.  Nothing shows. Blank stage.
    I also tried setting the view to full.  No difference.
    As for pasting code into the run box...all that shows on your post are funny symbols that I can't make sense of.
    I have tried all the tools...pen, pencil, paint brush, text, all with the same results.
    I have checked the drawing preferences and everything is set to normal.
    I am going to reinstall tomorrow, unless someone comes up with a solution.
    Thanks everyone....I'll keep you posted!

  • Object drawing poorly aligned bounding box problem

    Whenever I draw a shape with Object Drawing turned on the blue bounding box that appears whenever it is selected isn't aligned properly to the outer edgers of the shape.  Like this:
    Admittedly it isn't a major problem it's just a bit irritating especially when people I'm teaching to use Flash ask me why it looks the way it does.
    Does anyone else have this problem?
    Does anyone know if it can be fixed?

    Hi Jen,
    I'm most grateful for your response!
    I am running Flash CS4 10.0.2 on a 2.4GB Mac OS X 10.5, MacBook Pro with 4GB RAM.
    Following your reply, I tried a new AS2 file - and there is absolutely no issue! Its fine. How odd!
    However, the problem occurs in all AS3 files - if I create a new Flash AS 3.0 file and draw on the stage, the problem occurs for the following shapes:
    1. Rectangle tool
    2. Ellipse tool
    3. Polygon Tool
    Rectangle primitive and Ellipse primitive are fine.
    The smaller the object is, the more the bounding box is out of alignment. I have attached a further screengrab to show how bad things get when zoomed in working on small shapes (zoomed to 800%). Its completely unusable in object mode. The fact that the primitive shapes work is good, but the ellipses can be a bit unreliable in their shape. I've been trying to skin some detailed Flex components, but just can't work like this, so its been very frustrating.
    I have really no idea where to start. I tried to re-install from the CS4 Web Premium DVDs, but as luck would have it, my SuperDrive has packed up and I have to wait for a week at the Apple Store before dropping it in to get fixed, so can't do that for now.
    Cheers,
    raff

  • Using jpegEncoder object and filesystem

    Hi, I also posted this in the Flex general forum, but it
    seems to be more AIR related since it deals with saving to the
    local disk. I am trying to create a simple AIR application that
    creates a thumbnail from an image component and saves it as a jpeg
    to the desktop. I am not sure where I am going wrong here, but the
    file is corrupt and no information is being written to it. If I
    look at the content (via the "more" command on the command line) it
    is 8 blank lines.
    Thanks so much,
    Jed
    =========
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.graphics.codec.*;
    import mx.events.FileEvent;
    private function captureImg():void{
    //captures the image as a jpg and saves it to the desktop
    var codec:JPEGEncoder = new JPEGEncoder();
    //var ba:ByteArray = new ByteArray;
    var file:File =
    File.desktopDirectory.resolvePath("test.jpg");
    var filestream:FileStream = new FileStream;
    var snapShot:ImageSnapshot = new ImageSnapshot;
    snapShot = ImageSnapshot.captureImage(bigImg,72,codec);
    filestream.open(file, FileMode.WRITE);
    filestream.writeBytes(
    codec.encodeByteArray(snapShot.data,420,120),0,snapShot.data.length);
    filestream.close();
    private function makeSmall():void{
    //makes the image on the screen thumbnail size
    var pic:Image = bigImg;
    pic.setActualSize(420, 120);
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalAlign="top">
    <mx:Image id="bigImg" width="480" height="320"
    source="orignial/test2.jpg"/>
    <mx:Button label="Reduce Size" id="btnSmaller"
    click="makeSmall();" />
    <mx:Button label="Snap Thumbnail" id="btnThumbnail"
    click="captureImg();"/>
    </mx:VBox>
    </mx:WindowedApplication>
    Text

    Well I didn't get any feedback here on this problem. But I
    did figure it out.
    ===============
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical">
    <mx:Script>
    <![CDATA[
    import flash.display.BitmapData;
    import mx.graphics.codec.JPEGEncoder;
    import flash.filesystem.*;
    private function captureImg():void{
    ** A bitmapData object is needed to contain the visual data
    var bmpd:BitmapData = new BitmapData(
    smallImg.width,smallImg.height, false, 0xFFFFFF);
    bmpd.draw(smallImg);
    ** the bitmapdata object needs to be encoded into an
    byteArray with
    ** the JPEGEncoder. there is also a PNGEncoder for .png
    files if wanted
    ** The paramerter passed is the quality of jpeg we are
    encoding, 50 - 100.
    var jpegEnc:JPEGEncoder = new JPEGEncoder(80);
    var ba:ByteArray = jpegEnc.encode(bmpd);
    ** Then we need to take the byteArray and save it to disk.
    ** this requries using a File and fileStream object. The try
    block
    ** catches the end of file error.
    var file:File =
    new
    File("file:///Developer/Flex/thumbnailDemo/src/thumbnail/thumb1.jpg");
    var filestream:FileStream = new FileStream();
    try{
    filestream.open(file, FileMode.WRITE);
    filestream.writeBytes(ba);
    filestream.close();
    }catch (e:Error){
    trace(e.message);
    filePath.text = file.name + " has been saved to " +
    file.nativePath;
    filePath.enabled = true;
    ** makeSmall reduces the size of the main image and places
    it in
    ** the smallImg component to await capture
    private function makeSmall():void{
    //makes the image on the screen thumbnail size
    var pic:Image = bigImg;
    var otherPic:Image = smallImg;
    smallImg.source = bigImg.source;
    otherPic.setActualSize(120, 80);
    ** loadThumb loads the saved thumbnail to the savedPic
    component
    private function loadThumb():void{
    var thumb:File =
    new
    File("file:///Developer/Flex/thumbnailDemo/src/thumbnail/thumb1.jpg");
    if (thumb.exists){
    var src:File = new
    File("file:///Developer/Flex/thumbnailDemo/src/");
    var relPath:String = src.getRelativePath(thumb);
    savedPic.source = relPath;
    filePath.text = "The Thumbnail has been sucessfully loaded
    from "
    + thumb.nativePath;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="left" verticalAlign="top">
    <mx:HBox>
    <mx:Image id="bigImg" width="480" height="320"
    source="orignial/test2.jpg"/>
    <mx:VBox verticalAlign="top" horizontalAlign="center">
    <mx:Label text="Thumbnail"/>
    <mx:Image id="smallImg" width="120" height="80" />
    <mx:Label text="Saved Thumbnail" />
    <mx:Image id="savedPic" width="120" height="80" />
    </mx:VBox>
    </mx:HBox>
    <mx:HBox horizontalAlign="left">
    <mx:Button label="Reduce Size" id="btnSmaller"
    click="makeSmall();" />
    <mx:Button label="Snap Thumbnail" id="btnThumbnail"
    click="captureImg();"/>
    <mx:Button label="Load Thumbnail" id="btnLoad"
    click="loadThumb();"/>
    </mx:HBox>
    <mx:Label id="filePath" enabled="false" />
    </mx:VBox>
    </mx:WindowedApplication>

  • Getting Bitmap object at runtime

    When you load an external SWF at runtime and instantiate a symbol that contains a Bitmap object in the .fla file the type of the Bitmap is actually Shape at runtime. Without exporting the object for ActionScript is there any way to get the actual Bitmap object without using bitmapData.draw on a new object?
    Where I am going with this is I would like to use the object where a Bitmap type is needed without creating a new bitmap object for memory reasons but it seems like Flash turns this into a generic Shape object at some point.

    After doing some research it seems like I am basically stuck unless I give it a linkage name in the library which is not an option because this is a .swf that is going to be loading dynamically on an iOS device.
    Oh well =/

  • How do you connect lines for a drawing in order to use the live paint bucket tool?

    Hello! Im fairly new (okay not really) to using adobe illustrator
    I used the Image trace tool to outline this drawing of Captain America but unfortunately the lines arent connected and therefore
    messes up my colouring completely when I use the Live Paint Bucket tool.
    Is there a way to connect the lines so they are closed when I colour it? Or is there another way to color this drawing?
    Help would be greatly appreciated!

    Those gaps are very wide. Draw some paths and apply no fill, no stroke to them.
    Then make the live paint. In case the live paint already exists, you can go into isolation mode and then draw the paths. Or draw them and use Object > Live paint > Merge

  • How to find the WI of the Workflow based on Object Key of DIR (DMS)

    Hi Gurus,
    We have developed a DIR workflow for status change, where we are using DRAW as the Business Object.
    We are not able to fetch the Work item ID of the Workflow based on the ObjectKey(Concatenation of DOCTYPE DOCNUMBER DOCPART DOCVERSION).
    Tried to use the View SWIVOBJECT, also Found no values related to the container table SWW_CONTOB when the Wiorkflow is triggered. But we can see the Contianer values in the workflow log.
    Is there a way to find the relation DIR and the Work item ID if the Workflow for Documents? For Documents(DIR), anything needs to be done explicitly? 
    Need to resolve this as we have too many things based on this including Reporting part to fetch the approval details of the workflow. 
    Thanks..
    Regards,
    Prathap
    Edited by: Prathap on Feb 18, 2011 5:37 PM

    Hi,
    You can use FM SAP_WAPI_WORKITEMS_BY_TASK and use the filters.
    Afterwards, for every wi id you should get their instances using class cl_swf_run_wim_factory=>find_by_wiid.
    Then, get instance of wf container using if_swf_run_wim.
    Now you can use interface if_swf_ifs_parameter_container to get parameters or variables.
    Regards,

  • Drawing class and package

    My program is about drawing class diagram,package,object and interface�
    I have just done only for package and class diagram
    When I click on the classdiagram icon from my toolbox, it draws a class diagram,but when I then click on the package icon, a package is drawn but the class diagram disappears�..and when I then click again on the classdiagram icon, the package disappears and the previous class diagram reappears,,,,so why??/
    What is the problem?? Is it wiz the viewport??? How can I draw both a class and a package�
    IN MY MAIN MENU I INCLUDE THIS CODE:
    public MainMenu (String title,ProjectDoc doc) {
         super (title,null);
         setResizable(true);
         doc = new ProjectDoc(this);
         this.doc = doc;
         classView = new ClassView(doc,this);
         packageView = new PackageView(doc,this);
              Container content = getContentPane();
        content.setLayout(new BorderLayout());
        JToolBar toolBar = new JToolBar();
        content.add (toolBar, BorderLayout.NORTH);
         classView.setPreferredSize (new Dimension(6000,3500));
         packageView.setPreferredSize(new Dimension(6000,3500));
        drawingPane = new JScrollPane (
                       ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                       ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        drawingPane.setViewportView(classView);
      drawingPane.setViewportView(packageView);plzzz help me it is very urgent

    Hi,
    call chapter4.Drawing.class
    <applet code="chapter4.Drawing.class" width="100"
    height="100"> </applet>Regards,
    Ram

Maybe you are looking for

  • How can I redownload an app I bought?

    I bought the latest version of Growl on the App store, then later forgot I already had it and used the Growl uninstaller to remove it, thinking to buy the latest version...duh. Now on the app store it says it is already installed and I can't seem to

  • Mzm.zhyujwje.pkg

    Need Help I have MacBook Pro and iMac which both runs Mac OS X 10.7.4 and purchased OS X Mountain Lion to upgrade it. So the Download starts and continue to download the Mountain and as it ends downloading I get this Alert Box "The application could

  • Pc problems

    hi all i have a problem with my pc it only goes only for about 10 sec. then goes off . specs p7n sli platuim 4gb ocz ram e8400 ati hd4850 2x80gb hard drives 500gb hard drive audigy 2 460watt cooler master extreme psu

  • Displaying Cumulative Balances in BA Balance Sheet Report Painter Reports

    Dear SAP Gurus, The system has Business Area Balance Sheet reports created in Report Painter. But in General Data Selection when I select period as a full fiscal year then the cumulative balances are shown. But if I wish to see the reports for a peri

  • Jndi data source references at deployment time

    hi, i have been thinking and trying for days now, so any hint is greatly appreciated. we have an enterprise java application with adf faces, bc4j and jpa all in one ear which runs on weblogic 10.3. we want several instances of the same application ru