Package edsdk.bindings

Examples of edsdk.bindings.EdsRational


                                    final String data = CanonUtils.getPropertyDataAdvanced( baseref, id );
                                    value = data;
                                    break;
                                }
                                case kEdsDataType_Rational: {
                                    final EdsRational struct = CanonUtils.getPropertyDataAdvanced( baseref, id );
                                    value = struct;
                                    break;
                                }
                                case kEdsDataType_Point: {
                                    final EdsPoint struct = CanonUtils.getPropertyDataAdvanced( baseref, id );
View Full Code Here


                    }
                    s = s.substring( 1 );
                }
                result = s;
            } else if ( EdsRational.class.isAssignableFrom( klass ) ) {
                final EdsRational struct = (EdsRational) value;
                result = new String( struct.numerator.longValue() + " / " +
                                     struct.denominator.longValue() );
            } else if ( EdsPoint.class.isAssignableFrom( klass ) ) {
                final EdsPoint struct = (EdsPoint) value;
                result = new String( "(" + struct.x + ", " + struct.y + ")" );
            } else if ( EdsRect.class.isAssignableFrom( klass ) ) {
                final EdsRect struct = (EdsRect) value;
                result = new String( struct.size.width + "x" +
                                     struct.size.height + ", (" +
                                     struct.point.x + ", " + struct.point.y +
                                     ")" );
            } else if ( EdsSize.class.isAssignableFrom( klass ) ) {
                final EdsSize struct = (EdsSize) value;
                result = new String( struct.width + "x" + struct.height );
            } else if ( EdsTime.class.isAssignableFrom( klass ) ) {
                final EdsTime struct = (EdsTime) value;
                result = new String( struct.year.intValue() + "-" +
                                     struct.month.intValue() + "-" +
                                     struct.day.intValue() + " " +
                                     struct.hour.intValue() + ":" +
                                     struct.minute.intValue() + ":" +
                                     struct.second.intValue() + "." +
                                     struct.milliseconds.intValue() );
            } else if ( EdsFocusInfo.class.isAssignableFrom( klass ) ) {
                final EdsFocusInfo struct = (EdsFocusInfo) value;
                // TODO: handle struct output
                result = struct.toString();
            } else if ( EdsPictureStyleDesc.class.isAssignableFrom( klass ) ) {
                final EdsPictureStyleDesc struct = (EdsPictureStyleDesc) value;
                result = new String( "\n    Color tone: " +
                                     struct.colorTone.longValue() +
                                     "\n    Contrast: " +
View Full Code Here

                case kEdsDataType_Double: //EdsDouble
                    return (T) Double.valueOf( memory.getDouble( 0 ) );
                case kEdsDataType_ByteBlock: //Byte Block // TODO: According to API, is either EdsInt8[] or EdsUInt32[], but perhaps former is a typo or an old value
                    return (T) memory.getIntArray( 0, size / 4 );
                case kEdsDataType_Rational: //EdsRational
                    return (T) new EdsRational( memory );
                case kEdsDataType_Point: //EdsPoint
                    return (T) new EdsPoint( memory );
                case kEdsDataType_Rect: //EdsRect
                    return (T) new EdsRect( memory );
                case kEdsDataType_Time: //EdsTime
View Full Code Here

TOP

Related Classes of edsdk.bindings.EdsRational

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.